Alert low traffic on linux interface

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
krak0v
Posts: 1
Joined: Fri Nov 25, 2016 10:49 am

Alert low traffic on linux interface

Post by krak0v »

Hi

We have a Linux server that sniff traffic on one of it interface. I need to know when the inbound traffic its too low in this interface, for example less than 100kbps. I'm very n00b in Nagios and the last days I was testing some plugins. It has to be through snmp, I found a plugin that work well in a normal monitor situation: monitor high traffic.

I want a warning alert when the traffic it below than 100kbps

./check_snmp_int.pl -H xx.xx.xx.xx -C community eth1 -k -w100:,10 -c0,0

prompt this:
Argument "100:" isn't numeric in numeric ne (!=) at ./check_snmp_int.pl line 701.
eth1:UP (78.9KBps/0.0KBps):1 UP: OK

Its there another plugin that do what I want or how can I set correctly this?

Thank any help

Nagios version: 3.2.3
Ubuntu 12.04
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Alert low traffic on linux interface

Post by rkennedy »

It sounds like the plugin doesn't suppot using the colon after, you could simply use check_snmp to do something like this -

Code: Select all

[root@localhost libexec]# ./check_snmp -H 192.168.5.41 -C nagiosprivate -v 2c -o IF-MIB::ifIndex.10 -w 11
/usr/bin/snmpget -Le -t 1 -r 5 -m ALL -v 1 [authpriv] 192.168.5.41:161 IF-MIB::ifIndex.10
IF-MIB::ifIndex.10 = INTEGER: 10
SNMP OK - 10 | IF-MIB::ifIndex.10=10;11;;

[root@localhost libexec]# ./check_snmp -H 192.168.5.41 -C nagiosprivate -v 2c -o IF-MIB::ifIndex.10 -w 11:
/usr/bin/snmpget -Le -t 1 -r 5 -m ALL -v 1 [authpriv] 192.168.5.41:161 IF-MIB::ifIndex.10
IF-MIB::ifIndex.10 = INTEGER: 10
SNMP WARNING - *10* | IF-MIB::ifIndex.10=10;0;;
You're right with using the colon though for less than, the second example I posted is what you're after I believe.
Former Nagios Employee
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Alert low traffic on linux interface

Post by bwallace »

In addition to rkennedy's post, I always refer people to this helpful guide on how to create less than or range thresholds:
http://www.techadre.com/content/nagios- ... lds-ranges
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked