check-ping is a plugin that monitors ping responses.
Configurable options
| Option | Short | Description | Default Value |
|---|---|---|---|
| --host | -H | Hostname or IP address to monitor | |
| --count | -n | Number of ping packets to send. If even one response is received within the threshold, the monitoring status becomes OK | 1 |
| --wait-time | -w | Threshold for total time (RTT) from sending ping packets to receiving responses. Unit: milliseconds (ms) | 1000 |
| --status-as | Overwrite the monitoring status. For example, if you specify CRITICAL=WARNING, the monitoring status will become WARNING when it would be CRITICAL. Multiple values can be specified, separated by commas |
||
| --help | -h | Show help |
--status-asis available in mackerel-check-plugins v0.50.1 and later.
Example configuration
The following configuration sends 5 packets to 192.168.1.1 and generates a Critical alert if none respond within 100ms.
[plugin.checks.check-ping-sample] command = ["check-ping", "-H", "192.168.1.1", "-n", "5", "-w", "100"]
To test the configuration, run the plugin directly in a terminal as follows:
check-ping -H 192.168.1.1 -n 5 -w 100
Repository
https://github.com/mackerelio/go-check-plugins/tree/master/check-ping