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
24693
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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!:>