The CHECK_PING plugin

Use ping to check connection statistics for a remote host.

Supported parameters are :

  • --hostname/-h [THRESHOLD]: host to ping
  • --warning/-w [THRESHOLD]: warning threshold pair
  • --critical/-c [CRITICAL]: critical threshold pair
  • --packets/-p [PACKETS]: number of ICMP ECHO packets to send (Default: 5)
  • --timeout/-t [PACKETS]: Seconds before connection times out (default: 10)
  • --use-ipv4/-4 [CRITICAL]: Use IPv4 connection
  • --use-ipv6/-6 [CRITICAL]: Use IPv6 connection

    THRESHOLD is [rta],[pl]% where [rta] is the round trip average travel time (ms) which triggers a WARNING or CRITICAL state, and [pl] is the percentage of packet loss to trigger an alarm state.

Usage Example

In the following example, we will ping a hostname and check some connection stats, using the following INI configuration style

  check_ping : CHECK_PING --hostname $ARG1$ --warning $ARG2$ 
   

Invocation

The following invocation example will ping a particular host and throw a warning if the percentage of packet loss is more than 50%

  check_nrpe -n -H my.jnrpe.server -c check_ping -a myhostname ,50%: