ping

check_ping

Checks the icmp ping connection.

Implementation

WindowsLinuxFreeBSDMacOSX

Examples

Default Check

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

Example using NRPE and Naemon

Naemon Config

define command{
    command_name         check_nrpe
    command_line         $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c $ARG1$ -a $ARG2$
}

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

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.
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.
plpacket loss in percent.