We are wanting to monitor our 3G failover on routers. So normally the circuit would be down and has a public IP.
We want alerts when the circuit comes up and is active but dont really want to allow SNMP queries from the outside interface.
Any thoughts? We thought about just an inverse ping but I am not sure how to accomplish that?
Thanks
Inverse Ping Alert
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Inverse Ping Alert
There is a plugin installed with XI by default called negate that can do this
You can create a new command like the following:
link_down
You can create a new command like the following:
link_down
Code: Select all
$USER1$/negate $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5 -t 5Re: Inverse Ping Alert
Thanks Scott but it isnt quite working.
The circuit is down right now and should show OK
or does negate somehow just send OK for the Critical Response?
./negate /usr/lib/nagios/plugins/check_icmp -H 166.156.67.150 -w 3000.0 80 -c 5000.0 90 -p 5 -t 5
CRITICAL - 166.156.67.150: rta nan, lost 100% :: 80: rta nan, lost 100% :: 90: rta nan, lost 100%|166.156.67.150rta=0.000ms;3000.000;5000.000;0; 166.156.67.150pl=100%;40;80;; 166.156.67.150rtmax=0.000ms;;;; 166.156.67.150rtmin=0.000ms;;;; 80rta=0.000ms;3000.000;5000.000;0; 80pl=100%;40;80;; 80rtmax=0.000ms;;;; 80rtmin=0.000ms;;;; 90rta=0.000ms;3000.000;5000.000;0; 90pl=100%;40;80;; 90rtmax=0.000ms;;;; 90rtmin=0.000ms;;;;
The circuit is down right now and should show OK
or does negate somehow just send OK for the Critical Response?
./negate /usr/lib/nagios/plugins/check_icmp -H 166.156.67.150 -w 3000.0 80 -c 5000.0 90 -p 5 -t 5
CRITICAL - 166.156.67.150: rta nan, lost 100% :: 80: rta nan, lost 100% :: 90: rta nan, lost 100%|166.156.67.150rta=0.000ms;3000.000;5000.000;0; 166.156.67.150pl=100%;40;80;; 166.156.67.150rtmax=0.000ms;;;; 166.156.67.150rtmin=0.000ms;;;; 80rta=0.000ms;3000.000;5000.000;0; 80pl=100%;40;80;; 80rtmax=0.000ms;;;; 80rtmin=0.000ms;;;; 90rta=0.000ms;3000.000;5000.000;0; 90pl=100%;40;80;; 90rtmax=0.000ms;;;; 90rtmin=0.000ms;;;;
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Inverse Ping Alert
you were missing the required % after 80 & 90
not
Code: Select all
./negate /usr/lib/nagios/plugins/check_icmp -H 166.156.67.150 -w 3000.0 80% -c 5000.0 90% -p 5 -t 5Code: Select all
./negate /usr/lib/nagios/plugins/check_icmp -H 166.156.67.150 -w 3000.0 80 -c 5000.0 90 -p 5 -t 5Re: Inverse Ping Alert
Thanks but I tried that and got these results
/negate /usr/lib/nagios/plugins/check_icmp -H 166.156.67.150 -w 3000.0 80% -c 5000.0 90% -p 5 -t 5
check_icmp: Failed to resolve 80%
/negate /usr/lib/nagios/plugins/check_icmp -H 166.156.67.150 -w 3000.0 80% -c 5000.0 90% -p 5 -t 5
check_icmp: Failed to resolve 80%
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Inverse Ping Alert
sorry, there was supposed to be a comma in there...
Also, if you want it to change the words CRITICAL to OK, do
Code: Select all
./negate /usr/lib/nagios/plugins/check_icmp -H 166.156.67.150 -w 3000.0,80% -c 5000.0,100% -p 5 -t 5Code: Select all
./negate -s /usr/lib/nagios/plugins/check_icmp -H 166.156.67.150 -w 3000.0,80% -c 5000.0,100% -p 5 -t 5Re: Inverse Ping Alert
SWEET! Thanks so much Scott that does the trick!