Switch port status monitoring
-
rdobbsmacu
- Posts: 36
- Joined: Tue Apr 28, 2015 3:11 pm
Switch port status monitoring
I am trying to figure out how to setup nagios xi to monitor switch port status and only notify me when the ports go from down to up so i'm notified when someone plugs something into a switch port on my network. Also how to setup nagios xi so all the down ports are not showing or being listed as a problem. That being said there are some ports I do what to be notified on if they go from up to down, like my servers and trunk ports between switches.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Switch port status monitoring
negate is your answer.
For example, check_dummy producing a critical state
Now let's use negate for check_dummy
Does this make sesne?
For example, check_dummy producing a critical state
Code: Select all
/usr/local/nagios/libexec/check_dummy 2 "Port is down"
CRITICAL: Port is down
echo $?
2Now let's use negate for check_dummy
Code: Select all
/usr/local/nagios/libexec/negate -s /usr/local/nagios/libexec/check_dummy 2 "Port is down"
OK: Port is down
echo $?
0As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Switch port status monitoring
You need to be introduced to the negate plugin.
It is useful anytime the desired outcome is opposite or at least different than what the plugin assumes.
It is useful anytime the desired outcome is opposite or at least different than what the plugin assumes.
-
rdobbsmacu
- Posts: 36
- Joined: Tue Apr 28, 2015 3:11 pm
Re: Switch port status monitoring
yes that does make sense. Question before I do this, will this make all my ports that are up and showing OK go to showing as critical?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Switch port status monitoring
Yes.
To avoid this you need to create a separate check command for the ones that you want to use negate with. Then update the specific services to use the negate command.
To avoid this you need to create a separate check command for the ones that you want to use negate with. Then update the specific services to use the negate command.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.