Network Connections, Stats and Bandwidth

check_iftraffic_nrpe.sh

Description:

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

Compatible With

  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x

License

GPL


Project Photos
Project Notes
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
Reviews (2) Add a Review
resolve selinux issue
by aovari, September 30, 2015

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



selinux blocking
by mathieu.chateau, March 31, 2015

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.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.6 (5)
Favorites
2
Views
44,849