Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check network bandwidth on local host (with ip command)
2
2018-07-05
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
- Nagios XI
GPL
9521
File | Description |
---|---|
check_net.sh | main script |
it checks RX and TX value of specified interface within some interval and provide speed in KB:
ip -s link show int | xargs| cut -d " " -f27,40
Usage:
check_net.sh -i dev -t int>0 -w int>0 -c int>0
Options:
-h show this page;
-t time interval between checks, in sec (default = 1sec);
-i name of network interface;
-w warning level (in KB) integer more then zero;
-c critical level (in KB) integer more then zero;
check_net.sh -i dev -t int>0 -w int>0 -c int>0
Options:
-h show this page;
-t time interval between checks, in sec (default = 1sec);
-i name of network interface;
-w warning level (in KB) integer more then zero;
-c critical level (in KB) integer more then zero;
Reviews (1)
Maybe you could change the output:
echo "$code - $int:$state in-rate:${rx_rate}KB out-rate:${tx_rate}KB | RX=${rx_rate}KB TX=${tx_rate}KB";
instead of:
echo "$code - $int:$state in-rate:${rx_rate}KB out-rate:${tx_rate}KB";
echo "$code - $int:$state in-rate:${rx_rate}KB out-rate:${tx_rate}KB | RX=${rx_rate}KB TX=${tx_rate}KB";
instead of:
echo "$code - $int:$state in-rate:${rx_rate}KB out-rate:${tx_rate}KB";
Owner's reply
make sense. Thanks