Page 1 of 1

understanding check-host-alive command for host/ping checks

Posted: Wed Feb 06, 2019 3:09 am
by ansaaft
Hi,

I have been using the check-host-alive command for ping_checks as well as for monitoring if host is up or down.
All the parameters are default. Is this redundant?

I want to be notified when
there is 80% packet drops in 15 secs (WARNING)
there is 100% packet drops in 20 secs (CRITICAL)
How can I achieve this?

I made the below changes for testing purpose, is the logic correct?
check_icmp -H 127.0.0.1 -w 10000.0,80% -c 15000.0,100% -p 5

I am expecting
WARNING - when there is 80% packet drop in 10 secs
CRITICAL - when there is 100% packet drop in 15 secs

Re: understanding check-host-alive command for host/ping che

Posted: Wed Feb 06, 2019 4:58 pm
by npolovenko
Hello, @ansaaft. I believe 10000.0 is the round trip average time it took to send and receive 5 sample ping packets. check_host_alive comes with predefined threshold values. This was made for convenience purpose. But you can change these values if you'd like.

Re: understanding check-host-alive command for host/ping che

Posted: Thu Feb 07, 2019 3:31 am
by ansaaft
Hi,

Thank you for replying.
So if I want to be notified only when
WARNING - when 80% packets are dropped in 20 secs
CRITICAL - when 100% packets are dropped in 30 secs

My command will be
check_icmp -H 127.0.0.1 -w 20000.0,80% -c 30000.0,100% -p 5

is that correct?

Re: understanding check-host-alive command for host/ping che

Posted: Thu Feb 07, 2019 2:48 pm
by npolovenko
@ansaaft, I believe it's an either-or condition. This command means:
check_icmp -H 127.0.0.1 -w 20000.0,80% -c 30000.0,100% -p 5
Show WARNING if RTA for 5 packets is longer then 20 seconds OR if the packet loss equals/higher then 80%
Show CRITICAL if RTA for 5 packets is longer then 30 seconds OR if the packet loss equals 100%