Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_net_traffic.sh
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
GPL
26826
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!
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/
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
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!:>