login: root

Tag Archive: bandwidth

bandwidth monitoring script for nagios (CentOS) – bw_watch.sh

Bash script for nagios, that monitors bandwidth usage on remote host. # usage ./bw_watch bw_warning bw_critical pkt_warning pkt_critical It takes momentary 5 secs average bandwidth from “vnstat”, and returns value for nagios. bc and vnstat packages at host side are necessary. bc package should be in default centos repository, vnstat and nrpe You can find in EPEL repo. Script itself, that You have to put to nagios plugins directory. In my case it was: /usr/lib64/nagios/plugins/ Script bw_watch.sh has to be in server that has to be checked. Download link

Download link On host, that has to be checked, you have to add to nrpe.conf (usually /etc/nagios/nrpe.cfg)

restart nrpe

nagios command definition at monitoring server (usually commands.cfg):

define service at monitoring server (where monitored host configuration is located): Parameters are: bandwidth_warning, bandwidth_critical, packets_warning, packets_critical Bandwidth is metered in kbits/s.

And reload nagios configuration

Insipration source:… Read more >

%d bloggers like this: