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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ansaaft
Posts: 19
Joined: Mon Aug 20, 2018 5:08 am

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

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ansaaft
Posts: 19
Joined: Mon Aug 20, 2018 5:08 am

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

Post 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?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

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

Post 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%
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked