You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of the UDP prober sends the hardcoded payload "cloudprober".
However, in practice there are many applications UDP that will simply drop a packet like that, which basically means one has to change the application to make it "probable" with cloudprober.
The source code udp.go in lines 44 ff. even lists this inline as an open todo.
In my case it would help me with a set of applications that only answer udp probes if they contain specific payload. Without this change cloudprober is not an option to monitor these applications.
I probably spoke too soon. We don't send a simple payload, but we send a message with payload. Message contains endpoints, timing data, and payload. If you just change the "inner payload", your UDP server will likely still not recognize the packet.
I was wondering what kind of apps you had in mind, and what kind of payloads do they expect. We may need another probe type to probe these apps. We may also try just modifying this probe, but getting more context from your side will help figure out the best way for this.
I came across this issue (along with #138) while looking for a way to monitor generic UDP endpoints (like services expecting a simple "Ping"-"Pong" or custom text/binary payloads) with Cloudprober.
I reviewed the codebase and the earlier discussions on both issues. I understand that the existing UDP probe is specifically tailored for network flow quality measurement and relies on internal/udpmessage (packing magic numbers, sequence numbers, timing data). Because of this, simply modifying the inner payload still leaves the protocol wrapper header intact, which generic third-party UDP servers won't recognize.
To support generic UDP health checks and resolve both #137 and #138 in one cohesive effort, I'd love to help implement this feature. This is a high-level proposal:
Probe Modes & Backward Compatibility:
Introduce an explicit mode field in udp.ProbeConf, keeping UDPMESSAGE as default for 100% backward compatibility with Cloudprober's UDP server.
enumMode {
UDPMESSAGE=0; // Default: Cloudprober internal binary format with timing/metricsRAW=1; // Generic mode: sends request_payload as raw bytes
}
Configuration Enhancements:
mode: Probe execution mode (defaults to UDPMESSAGE).
request_payload: Payload string/bytes to send when in RAW mode.
wait_for_response: (bool, default true) Whether to wait for a response packet in RAW mode.
Response Validation (Resolves UDP Probe add expected payload #138):
In RAW mode, pass the received raw response bytes into Cloudprober's built-in validators framework (as suggested in UDP Probe add expected payload #138). This enables users to check responses using standard matchers (like regex or json).
Architecture Alignment:
Use sched.Scheduler for handling request-response round trips (aligned with probes/tcp).
Implement ProbeWithRunOnce to support single-run mode for CLI debugging.
Activity
manugarg commentedon May 11, 2022
Sure, this should be an easy change. I'll submit the fix soon.
manugarg commentedon May 14, 2022
@momoXD007 and @tarrychk,
I probably spoke too soon. We don't send a simple payload, but we send a message with payload. Message contains endpoints, timing data, and payload. If you just change the "inner payload", your UDP server will likely still not recognize the packet.
To give you some background, this probe was written primarily for detecting network issues. Cloudprober comes with a UDP server that this probe can work with: https://github.com/cloudprober/cloudprober/tree/master/servers/udp. This is what we did at my previous job (Google).
I was wondering what kind of apps you had in mind, and what kind of payloads do they expect. We may need another probe type to probe these apps. We may also try just modifying this probe, but getting more context from your side will help figure out the best way for this.
manugarg commentedon May 19, 2022
@momoXD007 wondering if you got a chance to look at my last message.
momoXD007 commentedon May 19, 2022
One IPsec Gateway I saw, expects “Ping“ as payload for its UDP healthcheck and sends “Pong” back. A neat test to see if it works.
I imagine many applications that use UDP would implement a similar mechanism. But it is just an “educated guess”.
pseudorandom314 commentedon Nov 3, 2026
Hey @manugarg and @momoXD007 ,
I came across this issue (along with #138) while looking for a way to monitor generic UDP endpoints (like services expecting a simple "Ping"-"Pong" or custom text/binary payloads) with Cloudprober.
I reviewed the codebase and the earlier discussions on both issues. I understand that the existing
UDPprobe is specifically tailored for network flow quality measurement and relies oninternal/udpmessage(packing magic numbers, sequence numbers, timing data). Because of this, simply modifying the inner payload still leaves the protocol wrapper header intact, which generic third-party UDP servers won't recognize.To support generic UDP health checks and resolve both #137 and #138 in one cohesive effort, I'd love to help implement this feature. This is a high-level proposal:
Probe Modes & Backward Compatibility:
Introduce an explicit
modefield inudp.ProbeConf, keepingUDPMESSAGEas default for 100% backward compatibility with Cloudprober's UDP server.Configuration Enhancements:
Response Validation (Resolves UDP Probe add expected payload #138):
In RAW mode, pass the received raw response bytes into Cloudprober's built-in validators framework (as suggested in UDP Probe add expected payload #138). This enables users to check responses using standard matchers (like regex or json).
Architecture Alignment:
Please let me know if this approach sounds good to you. If approved, I'd be happy to submit a PR including the implementation and unit tests.