Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_iftraffic_nrpe.sh

Rating
5 votes
Favoured:
2
Current Version
0.18
Last Release Date
2015-11-16
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
License
GPL
Hits
44785
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
check_iftraffic_nrpe.sh
Get network interface statistics from a Linux host, but be economical with the output, and try to select interfaces automatically.
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)
byaovari, September 21, 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
bymathieu.chateau, March 21, 2015
1 of 1 people found this review helpful
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.