Page 1 of 1

check_netint.pl for network interfaces

Posted: Thu Aug 28, 2014 10:56 am
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.

Re: check_netint.pl for network interfaces

Posted: Thu Aug 28, 2014 1:29 pm
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.

Re: check_netint.pl for network interfaces

Posted: Thu Aug 28, 2014 4:32 pm
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!