Inverse Ping Alert

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Inverse Ping Alert

Post by isadmin »

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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Inverse Ping Alert

Post by scottwilkerson »

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

Code: Select all

$USER1$/negate $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5 -t 5
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: Inverse Ping Alert

Post by isadmin »

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;;;;
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Inverse Ping Alert

Post by scottwilkerson »

you were missing the required % after 80 & 90

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 5
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 5
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: Inverse Ping Alert

Post by isadmin »

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%
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Inverse Ping Alert

Post by scottwilkerson »

sorry, there was supposed to be a comma in there...

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 5
Also, if you want it to change the words CRITICAL to OK, do

Code: 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 5
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: Inverse Ping Alert

Post by isadmin »

SWEET! Thanks so much Scott that does the trick!
Locked