Add bandwidth plugin in the nagios

The bandwidth plugin does not come by default in nagios. So we have to install it and make it working to monitor bandwidth traffic.

Server Side configuration:


After download the check_bandwidth.sh script put it in the plugin folder, as per my case it is in

(Path)# /usr/local/nagios/libexec/check_bandwidth
#chmod +x check_bandwidth (Must be executable)

- Add the below define command code in the commands.cfg file

(Path)# /usr/local/nagios/etc/objects/commands.cfg

define command{
command_name check_bandwidth
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_bandwidth 
}

After this define the service of memory in your monitoring file. In my case the path is
(Path) # /usr/local/nagios/etc/objects/myhost.cfg

define service{
        use                             local-service
        host_name                   myhost
        service_description       Bandwidth
        check_command           check_nrpe!check_bandwidth
        }

# service nagios restart

Client Side Configuration: (Linux)

Add the same script on the client side in the same path
(Path) # /usr/local/nagios/libexec/check_bandwith.sh
# chmod +x check_bandwidth.sh

Add the below line in the nrpe.cfg file.
(Path) # /usr/local/nagios/etc/nrpe.cfg

command[check_bandwidth]=/usr/local/nagios/libexec/check_bandwidth.sh 500 800 500 800

Now you can see the bandwidth service in the nagios web panel under your host. You can also check the whether the service is working or not by the below command.

/usr/local/nagios/libexec/check_nrpe -H IP_Address -c check_bandwidth





Comments

  1. The bandwidth plugin does not come by default in nagios. So we have to install it and make it working to monitor bandwidth traffic.Thanks for helping me to understand basic concepts. As a beginner in DevOps, your post helps me a lot.
    best devops training in chennai | DevOps training in Chennai omr | DevOps training in Chennai with placement

    ReplyDelete

Post a comment

Please give your review or ask question ?