check_ping

Checks the ICMP ping connection.

Implementation

WindowsLinuxFreeBSDMacOSX
✅✅✅✅

Argument Defaults

ArgumentDefault Value
filternone
warningrta > 1000 || pl > 30
criticalrta > 5000 || pl > 80
empty-state3 (UNKNOWN)
empty-syntax%(status) - could not get any ping data
top-syntax%(status) - %(list)
ok-syntax
detail-syntaxPacket loss = %(pl)%{{ IF rta != ’’ }}, RTA = %(rta)ms{{ END }}

Check Specific Arguments

ArgumentDescription
-4Force using IPv4.
-6Force using IPv6.
-ttimeout in seconds for each ICMP ECHO packet
hosthost name or IP address to ping
packetsnumber of ICMP ECHO packets to send (default: 5)

Attributes

Filter Keywords

these can be used in filters and thresholds (along with the default attributes):

AttributeDescription
host_namehost name ping was sent to.
ttltime to live.
sentnumber of packets sent.
receivednumber of packets received.
rtaaverage round trip time in milliseconds.
plpacket loss in percent.

Examples

Default Check

check_ping host=localhost
OK - Packet loss = 0%, RTA = 0.113ms |...

Example using check_snclient and Naemon

Naemon Config

define command{
    command_name         check_snclient
    command_line         $USER1$/check_snclient -k -p 'your-password' -u 'https://$HOSTADDRESS$:8443' $ARG1$ $ARG2$
}

define service {
    host_name            testhost
    service_description  check_ping
    use                  generic-service
    check_command        check_snclient!check_ping!'host=localhost' 'warn=rta > 1000 || pl > 30' 'crit=rta > 5000 || pl > 80'
}