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_net_traffic.sh

Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
License
GPL
Hits
26826
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_net_traffic.sh
Network traffic monitoring
pnp4nagios:
https://raw.githubusercontent.com/code4alex/NagiosPlugins/master/check_net_traffic.php
1. Add nrpe commands to nrpe.cfg
echo 'command [check_net_traffic]=/usr/local/nagios/libexec/check_net_traffic.sh -d eth0 -w 7m -c 10m' >> /usr/local/nagios/etc/nrpe.cfg

Description:
-d is the name of the interface(eth0;bond0) to be monitored
-w -c is set threshold, only b, k, m, g, the case may be, the unit is B (bytes), should be noted that this threshold is upstream (upload) and downstream (download) the sum.

Note:
1. first run the script, sets the current value of the card is written to the relevant temporary file, temporary files are stored in /usr/local/nagios/libexec/
Reviews (1)
byhunter, May 4, 2014
There is no necessary spaces,
1. Add nrpe commands to nrpe.cfg
echo 'command [check_net_traffic] = /usr/local/nagios/libexec/check_net_traffic.sh -d eth0 -w 7m -c 10m' >> /usr/local/nagios/etc/nrpe.cfg
I think it should be like this,
echo 'command[check_net_traffic]=/usr/local/nagios/libexec/check_net_traffic.sh -d eth0 -w 7m -c 10m' >> /usr/local/nagios/etc/nrpe.cfg
Owner's reply

You are right!:>