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
This is similar to #23, or at least requires the same sort of primitives.
Cloudprober is designed to run in a continuous mode, but it will be nice to be to able to run it just once (or given number of times, like -c flag of ping) and generate a report, or pass/fail signal.
For certain probe types it will be more difficult to support single run interface, e.g. PING, UDP, but for others, e.g. HTTP, DNS, GRPC, TCP, EXTERNAL, it should be doable. This issue tracks the implementation of such an interface for such probe types.
Gave more thought to single run interface at the binary level and below:
Interface
Binary Flags: —single_mode, —count
Current flow is cmd/cloudprober → cloudprober.Start → prober.Start → probe.Start , on singleMode it will be cmd/cloudprober → cloudprober.Run(count) → prober.Run(count) → probe.Run(count)
Probe will need to support Run interface. We can add another interface called ProbeWithRun.
In single run mode, we’ll not write metrics to the shared data channel, instead we’ll just return EventMetrics. We’ll summarize EventMetrics after run and return output in JSON as well as human-readable text format.
Comments
Run interface will be hard for ping, and UDP style probes, but that’s okay.. we don’t have to build them all at once.
One of the usage of this functionality could be to run cloudprober to verify a deployment. It may be useful to extend this functionality with things like:
Wait for minimum 3 consecutive successes, and wait for up-to 5 min.
Override probe interval and timeout on command line
Activity
manugarg commentedon Jan 21, 2025
For certain probe types it will be more difficult to support single run interface, e.g. PING, UDP, but for others, e.g. HTTP, DNS, GRPC, TCP, EXTERNAL, it should be doable. This issue tracks the implementation of such an interface for such probe types.
[probes.http] Refactor http-probe:scheduler interface. (#967)
manugarg commentedon Jan 23, 2025
Gave more thought to single run interface at the binary level and below:
Interface
cmd/cloudprober → cloudprober.Start → prober.Start → probe.Start, on singleMode it will becmd/cloudprober → cloudprober.Run(count) → prober.Run(count) → probe.Run(count)Comments
Run interface will be hard for ping, and UDP style probes, but that’s okay.. we don’t have to build them all at once.
manugarg commentedon Jan 31, 2025
Probe's run interface will look like this:
Older interface will look like this:
manugarg commentedon Feb 23, 2025
I think final result format is going to be interesting here. Do we return metrics in the end, or just success/fail and perhaps overall duration?
Or maybe both? We can do the following:
[probes.http] Streamline payload metrics handling (#1017)
manugarg commentedon Mar 21, 2025
One of the usage of this functionality could be to run cloudprober to verify a deployment. It may be useful to extend this functionality with things like:
manugarg commentedon Aug 5, 2025
Added first draft of single run interface in #1081.