Page 1 of 1

router port check for no traffic

Posted: Fri Feb 09, 2018 8:04 am
by elinagios
Hello

is there a way to monitor switch/router and get an alert when traffic on some port goes to 0. On some ports there must be constant traffic, doesnt matter how much, but if it goes to 0 then i should get an alert. Is that doable?

Thank you.

Re: router port check for no traffic

Posted: Fri Feb 09, 2018 11:34 am
by kyang
Did you configure that switch or router with the network/switch config wizard in XI already?

I would use something called the negate plugin. Here is our documentation on using it also.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Right now I have a router and on port 1 bandwidth --> I'm getting 0Mbps out.

Code: Select all

/usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.5.90_1.rrd -w 50.00,50.00 -c 80.00,80.00 -l M
OK - Current BW in: 0Mbps Out: 0Mbps|in=0Mb/s;50.00;80.00 out=0Mb/s;50.00;80.00
However, by putting the negate plugin path in front of it, it is now showing critical. This in front of the original command. --> /usr/local/nagios/libexec/negate -s

Code: Select all

/usr/local/nagios/libexec/negate -s /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.5.90_1.rrd -w 50.00,50.00 -c 80.00,80.00 -l M
CRITICAL - Current BW in: 0Mbps Out: 0Mbps|in=0Mb/s;50.00;80.00 out=0Mb/s;50.00;80.00
That means if traffic suddenly goes through this port again. Then It would be back to an OK state.

Is this what you were looking for?

Re: router port check for no traffic

Posted: Mon Feb 12, 2018 9:24 am
by elinagios
Yes, that is what i was looking for. Thank you!

Re: router port check for no traffic

Posted: Mon Feb 12, 2018 10:23 am
by kyang
Perfect!

Did you have any more questions or are we okay to lock this up?