A single Globalping probe can have a bad route or a bad moment, which
shows up as a false incident (#154). With `probes=N` in the check proxy
URL a TCP_PING or ICMP_PING monitor asks N probes in one measurement:
checkProxy: 'globalping://<token>?magic=US&probes=2'
The result of the probe with the least packet loss is used, so the
monitor is only down when no probe gets a reply. It's still a single
measurement (one API request to create it, the same polling), each
probe costs a Globalping credit. HTTP monitors are not changed.
Co-Authored-By: Claude <noreply@anthropic.com>
Workers can't send ICMP packets (#118, #207), but a Globalping probe
can. This adds `method: 'ICMP_PING'` for monitors with a `globalping://`
check proxy:
{
id: 'router',
name: 'Router',
method: 'ICMP_PING',
target: '1.2.3.4',
checkProxy: 'globalping://<token>?magic=US',
}
`target` is a hostname or an IP address. Three packets are sent, and the
monitor is down when none of them gets a reply. Without a Globalping
check proxy the monitor reports an error saying so.
Builds on the fix for ping measurements with 100% packet loss.
Co-Authored-By: Claude <noreply@anthropic.com>
Globalping marks a ping measurement as `finished` even when every packet
is lost. In that case `stats.loss` is 100 and `stats.avg` is null, e.g.
{"min":null,"max":null,"avg":null,"total":1,"loss":100,"rcv":0,"drop":1}
The TCP_PING branch only looked at the measurement status, so such a
result was returned as `up: true` with a ping of `Math.round(null)` = 0,
and a monitor behind a globalping:// proxy never went down while the
target was unreachable.
Treat 100% loss (or a missing average) as down and report the loss in
the error message.
Co-Authored-By: Claude <noreply@anthropic.com>
* Update token usage in sync workflow
* sync: fallback to PAT_TOKEN secret when override-token is empty
Explain briefly:
UI input field doesn’t evaluate ${{ secrets.* }}, users may paste it and it becomes a literal string.
Add fallback to secrets.PAT_TOKEN to make workflow_dispatch easier and safer.
* More detailed desc
---------
Co-authored-by: lyc8503 <me@lyc8503.net>
Globalping rejects measurementOptions.ipVersion when the measurement target is an IP address.
Add an IP-target guard so ipVersion is only sent for domain targets, preventing validation errors when checking IP:port monitors.
The API for status is showing CORS issue: "Response body is not available to scripts (Reason: CORS Missing Allow Origin)" when using from other domain/localhost. To solve this ,CORS header is added. It also possible to specify allowed domain in Env Var in cloudflare and call them directly.