Page 1 of 3
How do I set up rta alerts against a router (Zaji) ?
Posted: Mon Dec 15, 2014 8:56 am
by zaji_nms
Dear Expert
I tried as below and giving error : CRITICAL - Plugin timed out after 10 seconds
check_icmp <<<< I tried to change with check_ping but same error.
$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
ARG1 : 70,10%
ARG2 : 150,20%
Regards
FYI, host is pingable from Nagios Web (ping this host)
PING jdn-ons-1 (10.10.60.3) 56(84) bytes of data.
64 bytes from jdn-ons-1 (10.10.60.3): icmp_seq=1 ttl=54 time=84.0 ms
Regards
version 2014R2
COMMAND: /usr/local/nagios/libexec/check_ping -H jdn-ons-1 -w 70,10% -c 150,20% -p 5
OUTPUT: CRITICAL - Plugin timed out after 10 seconds
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Mon Dec 15, 2014 1:00 pm
by sreinhardt
What version of plugins are you currently running? It has also been suggested that older versions may need to use check_icmp opposed to check_ping, as there was a few issues that should be resolved now.
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Tue Dec 16, 2014 4:45 am
by zaji_nms
Dear Expert
To work around, I changed to Check_XI_host_ping and somehow its okay but even when its Warning, showing Green and there is No Alert in OPERATION CENTER (NOCscreen)
The below answer per your request.
Please note running fine at command prompt but at WEB level showing error, as mentioned above.
# /usr/local/nagios/libexec/check_ping --version
check_ping v2.0.3 (nagios-plugins 2.0.3)
# /usr/local/nagios/libexec/check_ping -H jdn-ons-1 -w 70,10% -c 100,20% -p 5
CRITICAL - Plugin timed out after 10 seconds
# /usr/local/nagios/libexec/check_icmp -H jdn-ons-1 -w 70,10% -c 100,20% -p 5
CRITICAL - jdn-ons-1: rta 103.909ms, lost 0%|rta=103.909ms;70.000;100.000;0; pl=0%;10;20;; rtmax=104.994ms;;;; rtmin=102.600ms;;;;
# /usr/local/nagios/libexec/check_icmp --version
check_icmp v2.0.3 (nagios-plugins 2.0.3)
# /usr/local/nagios/libexec/check_ping -H jdn-ons-1 -w 70,10% -c 100,20%
CRITICAL - Plugin timed out after 10 seconds
Regards
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Tue Dec 16, 2014 10:18 am
by tgriep
Try changing the check_ping command to this
/usr/local/nagios/libexec/check_ping -H jdn-ons-1 -w 70,10% -c 100,20% -4
The -4 is for Use IPv4 connection
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Tue Dec 16, 2014 1:28 pm
by zaji_nms
Dear tgriep
Yes its okay but taking around 4 seconds delay to show the result.
/usr/local/nagios/libexec/check_ping -H jdn-ons-1 -w 70,10% -c 100,20% -4
PING WARNING - Packet loss = 0%, RTA = 82.44 ms|rta=82.444000ms;70.000000;100.000000;0.000000 pl=0%;10;20;0
This is very instantaneous (quick result)
/usr/local/nagios/libexec/check_icmp -H jdn-ons-1 -w 70,10% -c 100,20%
WARNING - jdn-ons-1: rta 82.440ms, lost 0%|rta=82.440ms;70.000;100.000;0; pl=0%;10;20;; rtmax=82.610ms;;;; rtmin=82.328ms;;;;
As I told in previous post, I worked around and problem resolved by selecting check_xi_host_ping, the problem is even its Warning, no alert showing (showing GREEN).
I will try with check_ping and alongwith (-4) , I will update you.
Can you just let us know what is difference between Check_ping ,, Check_icmp ,, Check_xi_host_ping (which is better , or which should use in which condition?)
Regards
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Tue Dec 16, 2014 1:51 pm
by lmiltchev
The "check_ping" relies on the "/bin/ping" to perform the check, while the "check_icmp" performs the check itself. The "check_icmp" is supposed to be much more efficient than the "check_ping".
Talking about these commands (check_ping , check_icmp , and check_xi_host_ping), they actually all use check_ping.
The "check_xi_host_ping" uses "check_icmp":
Code: Select all
define command {
command_name check_xi_host_ping
command_line $USER1$/check_icmp -H $HOSTADDRESS$ -w $ARG1$,$ARG2$ -c $ARG3$,$ARG4$ -p 5
}
which in turn uses "check_ping":
Code: Select all
define command {
command_name check_icmp
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
}
and the "check_ping" uses...well, "check_ping":
Code: Select all
define command {
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
}
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Tue Dec 16, 2014 1:59 pm
by zaji_nms
Dear lmiltchev
Can you please let me know if there is delay and its Warning, why no alert generating? Why still showing green? Please go through my two previous post, I have attached file, Warning but showing green and there is no Alert in Operation Center.
I want Yellow/Warning alert in top Host Pane of the OPERATION CENTER (NOCscreen).
Regards
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Tue Dec 16, 2014 4:05 pm
by tmcdonald
For the check that is saying "WARNING" but showing green, can you post the full command that is being run on the command line? I want you to run that command, then immediately after run:
so we can see the exit code. It almost looks like a wrapper script is running instead of check_icmp directly, and it is not properly modifying the exit code.
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Wed Dec 17, 2014 1:41 am
by zaji_nms
Dear tmcdonald
in Host Status Detail
WARNING - jdn-ons-1: rta 82.386ms, lost 0% (but showing green as attached)
root#/usr/local/nagios/libexec/check_icmp -H jdn-ons-1 -w 70,5% -c 110,10% -p 5
WARNING - jdn-ons-1: rta 82.496ms, lost 0%|rta=82.496ms;70.000;110.000;0; pl=0%;5;10;; rtmax=82.573ms;;;; rtmin=82.447ms;;;;
root# echo $?
1
root#
Regards
Re: How do I set up rta alerts against a router (Zaji) ?
Posted: Wed Dec 17, 2014 11:32 am
by lmiltchev
Actually, this is normal (default behavior). Is the aggressive host checking enabled in the nagios.cfg?
Code: Select all
grep use_aggressive_host_checking /usr/local/nagios/etc/nagios.cfg
Please, read more about host states / return codes here:
http://http://nagios.sourceforge.net/do ... inapi.html