Page 1 of 1

check_icmp running time should be below 10 ms

Posted: Tue Feb 23, 2021 5:51 am
by informatica
Hi Team,

we are using the below check icmp command to see the IP status, but this is taking above 15ms but as per requirement it should response with in the 10 ms. could you please suggest us.


/usr/local/nagios/libexec/check_nrpe -H 10.25.192.167 -t 30 -c check_icmp -a "-H XXXX -w 800.000ms,40% -c 1000.000ms,60%" | awk '{print $1, $7, $8, $9, $10}'

In the above one we are pining the host XXXX from 10.25.192.167 server to check reachable. when it is not reachable its taking more time.

My concern in can we put any timeout for the check_icmp in ms ??
do we have any option such as it should give reply with in 10ms ?? /usr/local/nagios/libexec/check_nrpe -H 10.25.192.167 -t 30 -c check_icmp -a "-H XXXX -w 800.000ms,40% -c 1000.000ms,60%" | awk '{print $1, $7, $8, $9, $10}

Re: check_icmp running time should be below 10 ms

Posted: Wed Feb 24, 2021 10:03 am
by scottwilkerson
This is not possible because check_icmp needs to wait for all the icmp responses to be able to calculate the packet loss and average of the repsonses

Re: check_icmp running time should be below 10 ms

Posted: Wed Feb 24, 2021 1:58 pm
by informatica
We would like to change this way instead of 800 we we I'll change 150 ??

usr/local/nagios/libexec/check_nrpe -H 10.25.192.167 -t 30 -c check_icmp -a "-H XXXX -w 150.00ms,40% -c 250.000ms,60%" | awk '{print $1, $7, $8, $9, $10}


I just want to know what is this 800.00ms and 1000.00ms what it will refer??

Re: check_icmp running time should be below 10 ms

Posted: Wed Feb 24, 2021 2:22 pm
by scottwilkerson

Code: Select all

./check_icmp -h
check_icmp v2.3.3 (nagios-plugins 2.3.3)
Copyright (c) 2005-2018 Nagios Plugin Development Team
        <[email protected]>

Usage:
 check_icmp [options] [-H] host1 host2 hostN

Options:
 -h, --help
    Print detailed help screen
 -V, --version
    Print version information
 --extra-opts=[section][@file]
    Read options from an ini file. See
    https://www.nagios-plugins.org/doc/extra-opts.html
    for usage and examples.
 -w
    warning threshold (currently 200.000ms,40%)
 -c
    critical threshold (currently 500.000ms,80%)
 -R
    RTA, round trip average,  mode  warning,critical, ex. 100ms,200ms unit in ms
 -P
    packet loss mode, ex. 40%,50% , unit in %
 -J
    jitter mode  warning,critical, ex. 40.000ms,50.000ms , unit in ms
 -M
    MOS mode, between 0 and 4.4  warning,critical, ex. 3.5,3.0
 -S
    score  mode, max value 100  warning,critical, ex. 80,70
 -O
    detect out of order ICMP packts
 -4
    target address(es) are IPv4 and packets are ICMPv4
 -6
    target address(es) are IPv6 and packets are ICMPv6
 -H
    specify a target
 -s
    specify a source IP address or device name
 -n
    number of packets to send (currently 5)
 -p
    number of packets to send (currently 5)
 -i
    max packet interval (currently 80.000ms)
 -I
    max target interval (currently 0.000ms)
 -m
    number of alive hosts required for success
 -l
    TTL on outgoing packets (currently 0)
 -t
    timeout value (seconds, currently  10)
 -b
    Number of icmp data bytes to send
    Packet size will be data bytes + icmp header (currently 56 + 8)
 -v
    verbose

Notes:
 If not mode R,P,J,M,S or O is informed, default icmp behavior, RTA and packet loss

 The -H switch is optional. Naming a host (or several) to check is not.

 When defining multiple addresses they must be provided as the last argument.

 Threshold format for -w and -c is 200.25,60% for 200.25 msec RTA and 60%
 packet loss.  The default values should work well for most users.
 You can specify different RTA factors using the standardized abbreviations
 us (microseconds), ms (milliseconds, default) or just plain s for seconds.

 The -v switch can be specified several times for increased verbosity.

Send email to [email protected] if you have questions regarding use
of this software. To submit patches or suggest improvements, send email to
[email protected]
So for the -w & -c
Threshold format for -w and -c is 200.25,60% for 200.25 msec RTA and 60%
packet loss. The default values should work well for most users.
You can specify different RTA factors using the standardized abbreviations
us (microseconds), ms (milliseconds, default) or just plain s for seconds.