Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Get network interface statistics from a Linux host, but be economical with the output, and try to select interfaces automatically.
Current Version
0.18
Last Release Date
2015-11-16
Owner
Mark Clarkson
Download URL
https://github.com/mclarkson/check_iftraffic_nrpe.sh
License
GPL
Compatible With
check_iftraffic_nrpe.sh - Interface statistics plugin.
Usage: check_iftraffic_nrpe.sh [options]
-h : Display this help text. -i REGX : Include the interface(s) matched by the REGX regular expression. Defaults to showing all interfaces. Specify this option multiple times to add more. -x REGX : Exclude the interface(s) matched by the REGX regular expression. Defaults to excluding none. Excludes will override any includes. Specify this option multiple times to add more. -k : Don't include the slaves of bond devices or bond devices with no slaves. -p : Include performance data (for graphing). -b : Brief - exclude stats in status message. Useful for systems with many interfaces where a large status message might cause truncation of the performance data. -I NAME : Interface that must always be included. This is not a regular expression - it should match one interface only. Emits warning if an interface specified here is down. Specify this option multiple times to add more. -a : Semi automatic. This will try to work out if the interface is intentionally down or not and alert in the latter case. For example, if the administrator did 'ip li set eth2 up' then it would alert when down, but if instead 'ip li set eth2 down' then there would be no alert; the loopback device should always be up. -d : Exclude devices which are down, unless specifically included with '-I', in which case, a warning will be issued that the interface is down. -D NAME : Don't include performance stats for NAME interface. -B : Use bytes/s instead of bits/s in message output. -s : The interface speed in Mbits/s. This will be set the same for all selected interfaces. E.g. 1, 5, 10, 100. Default is 100. -w NUM : Warning threshold percentage. Warn when bandwidth usage exceeds NUM percent of the maximum. Interfaces in the '-D', no performance stats, list will not be checked. Default is 0, which also means, off.
Examples:
Check all interfaces:
./check_iftraffic_nrpe.sh
Show when loopback is down but don't create performance stats for it:
./check_iftraffic_nrpe.sh -D lo -p
Show when loopback is down but don't create performance stats for it, create performance stats for everything else, don't show slaves of bond devices or downed interfaces:
./check_iftraffic_nrpe.sh -D lo -p -k -d
Same as previous but use the smarter '-a' instead of '-d'. If the admin set the interface to be up but the interface is down then an alert will be raised.
./check_iftraffic_nrpe.sh -D lo -p -k -a
Same as previous but assume all interfaces are 100mbit and alert if either inboud or outbound traffic exceeds 95%.
./check_iftraffic_nrpe.sh -D lo -p -k -a -s 100 -w 95
Hi, The check is very good, works well. On RHEL, CentOS to solve SElinux issue use the restorecon utility: restorecon /usr/lib64/nagios/plugins/check_iftraffic_nrpe.sh
Hello, really good plugin doing the job. The issue I have on centos 7 is with selinux. Even using audit2allow to add rules i can't get it working :'(. The plugin tries to read things in /proc and get access denied.
You must be logged in to submit a review.
To:
From: