Pingtower Docs
Docs The addons agent udpcheck

udpcheck

Send one datagram to a UDP port and wait for the reply, retrying when one is lost. Runs on your own agents only.

UDP has no handshake, so an open port proves nothing. The only sign a UDP service is alive is a reply to something it understands. You supply that something as the payload, and optionally what the reply must contain. A datagram can be lost without anyone at fault, so a silent attempt is retried before the target is called down.

udpcheck runs on your own agents only. Datagrams of any content sent from Pingtower’s shared addresses would put those addresses’ reputation at risk, so a check that names a Pingtower region is refused with a 422 under the rule agent_only. See Hosted checks.

Parameters

ParameterDefaultMeaning
addressREQUIREDhost:port. There is no default port.
payloadThe datagram to send, as text. Exactly one of payload and payload_hex is required. 1 to 1,024 bytes.
payload_hexThe datagram, hex-encoded, for binary protocols.
expectText the reply must contain. Unset, any reply passes.
expect_hexBytes the reply must contain, hex-encoded. At most one of expect and expect_hex.
attempts3Sends before a silent target is down, 1 to 5.
max_rttRound trip above this is degraded.

The check’s timeout is split evenly across the attempts still to make, so a lost first datagram can’t use up the time the retries need.

Status

A reply that contains expect is up: replied in 3ms. Over max_rtt it is degraded.

It is down when:

  • the host does not resolve;
  • the target answers with ICMP port unreachable: port unreachable;
  • every attempt goes unanswered: no reply after 3 attempts;
  • a reply arrives that does not contain expect. That is an answer, not a loss, so it is not retried.

Measurements

KeyMeaning
dns_msResolution time, when address names a host rather than an IP
attemptsDatagrams sent
rtt_msRound trip of the attempt that was answered
total_msThe whole run
portLabel: the target port

The check needs addons agent 0.4.0 or later; an older agent reports it as an unknown addon.

Example

A DNS server answering a query for example.com, sent as raw bytes:

- id: resolver-udp
  addon: udpcheck
  interval: 30s
  with:
    address: 10.0.0.53:53
    payload_hex: "abcd01000001000000000000076578616d706c6503636f6d0000010001"
    expect_hex: "abcd"
    attempts: 3
    max_rtt: 50ms

A rule for it

{"name":"udp-down","match":{"tags":["addon:udpcheck"],"min_level":400}}
Last updated 11 Oct 2026 Report a problem with this page