check_netint.pl for network interfaces

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
sstins
Posts: 2
Joined: Wed Aug 27, 2014 12:50 pm

check_netint.pl for network interfaces

Post by sstins »

Really nice check to monitor bandwidth and errors on network interfaces. Have been running into one form of the check resulting in a perl error. Wondered if anyone might have a fix.

bash-4.1$ sudo /ois/usr/nagios/libexec/check_netint.pl -n "eth" -S -k -e -f -w 80,80,2,2,2,2 -c 90,90,4,4,4,4 -q -d 10 -u
Use of uninitialized value $speed_metric in division (/) at /ois/usr/nagios/libexec/check_netint.pl line 2490.
Illegal division by zero at /ois/usr/nagios/libexec/check_netint.pl line 2490.
sstins
Posts: 2
Joined: Wed Aug 27, 2014 12:50 pm

Re: check_netint.pl for network interfaces

Post by sstins »

Turns out the check uses ethtool to find net interface specs. If commands fails, some of the specs, like link speed, are not found. If you run check under non-root account you may not have permission to run ethtool. Also, on a VM, ethtool may return no specs, regardless of who executes the command.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_netint.pl for network interfaces

Post by slansing »

Ouch, that explains it, what do you need as far as metrics go that you need particularly from this plugin? Maybe we can find an alternative for you!
Locked