OpenUptime

Ping (ICMP) monitors

A ping monitor sends one ICMP echo request to a hostname or an IP address on each run. It passes when a reply comes back within the monitor's timeout, and the latency it records is the round trip ping reports.

Where ping runs

  • Self-hosted in Docker or on Node: ping works out of the box in the published Docker image. On a server of your own, the system ping command must be installed and allowed to send ICMP (see below).
  • Your own probes: a probe in Docker or on Node that can send ICMP offers ping checks, so a ping monitor can be checked from several regions. A probe that cannot reports its region as unreachable for that monitor; the other regions still vote.
  • The hosted service and Cloudflare Workers: not available. Workers cannot send ICMP, so the ping type is not offered there. Check a TCP port the host answers on instead.

The monitor form shows the ping type only when the server can send ping. The API refuses a ping monitor checked from auto on a server that cannot, with the code ping_unavailable.

Target

Enter a hostname (example.com) or an IP address (192.0.2.10, 2001:db8::10), without a scheme, port or path. A hostname is resolved on each run, and each address it resolves to is tried in turn within the timeout. Private addresses are refused unless your instance sets ALLOW_PRIVATE_TARGETS=true, as for every other monitor type.

What counts as down

  • No reply within the timeout fails the check, and the incident says which address did not answer.
  • When the checker itself cannot send ping (the command is missing, or the process is not allowed to send ICMP), nothing is recorded: that says nothing about the target, so it never opens an incident. The run's error says why.
  • Many hosts and firewalls drop ICMP while serving traffic normally. If a host never answers ping, monitor its HTTP or TCP port instead.

Permissions on your own server

On Linux, a process may send ping when its group is inside net.ipv4.ping_group_range or when the ping binary carries the cap_net_raw capability; most distributions set one of the two. If the form does not offer ping, run ping -c 1 127.0.0.1 as the user that runs OpenUptime and fix what it reports, then restart the server. Whether ping works is checked the first time it is needed and remembered until the server restarts.

Importing

Ping monitors from UptimeRobot and Uptime Kuma become ping monitors when the server can send ping, and are skipped with a reason otherwise. A Kuma packet size is not imported; one standard echo request is sent.

Ping(ICMP)监控

Ping 监控每次检测向一个主机名或 IP 地址发送一次 ICMP 回显请求。只要在监控的超时时间内收到回复就算通过,记录的延迟就是 ping 报告的往返时间。

在哪里可以使用

  • 用 Docker 或 Node 自托管:发布的 Docker 镜像可以直接使用 ping。在你自己的服务器上,需要安装系统的 ping 命令,并允许它发送 ICMP(见下文)。
  • 自建探针:能发送 ICMP 的 Docker 或 Node 探针会提供 ping 检测,因此 ping 监控也可以从多个区域检测。不能发送的探针会把该区域报告为无法连接,其他区域照常参与投票。
  • 托管服务与 Cloudflare Workers:不可用。Workers 无法发送 ICMP,因此不提供 ping 类型,请改为检测主机会响应的 TCP 端口。

只有服务器能发送 ping 时,监控表单才会显示 ping 类型。在无法发送的服务器上,从 auto 检测的 ping 监控会被 API 拒绝,错误码为 ping_unavailable。

检测目标

填写主机名(example.com)或 IP 地址(192.0.2.10、2001:db8::10),不要带协议、端口或路径。主机名每次检测时都会重新解析,并在超时时间内依次尝试解析出的每个地址。与其他监控类型一样,除非你的实例设置了 ALLOW_PRIVATE_TARGETS=true,否则内网地址会被拒绝。

什么算作故障

  • 超时时间内没有收到回复,检测失败,事件中会写明哪个地址没有响应。
  • 如果检测方自己无法发送 ping(没有安装命令,或进程不允许发送 ICMP),这次检测不会被记录:这与目标无关,因此不会创建事件。检测的错误信息会说明原因。
  • 很多主机和防火墙会丢弃 ICMP,但正常提供服务。如果某台主机从不响应 ping,请改为监控它的 HTTP 或 TCP 端口。

在自己服务器上的权限

在 Linux 上,进程所在的组位于 net.ipv4.ping_group_range 范围内,或者 ping 命令带有 cap_net_raw 能力时,才能发送 ping;大多数发行版会默认满足其中之一。如果表单中没有 ping 类型,请用运行 OpenUptime 的用户执行 ping -c 1 127.0.0.1,按提示修复后重启服务。服务会在第一次需要时检查 ping 是否可用,并在重启前一直沿用这个结果。

导入

来自 UptimeRobot 和 Uptime Kuma 的 Ping 监控,在服务器能发送 ping 时会转换为 ping 监控,否则会被跳过并说明原因。Kuma 的数据包大小不会导入,每次只发送一次标准回显请求。

Last updated 2026-11-16最后更新:2026-11-16