• Bandwidth monitoring using nagios

    About : –

    check_traffic is a very nice tool to alert the server bandwidth usage in linux servers. Its very easy to configure but very powerful.

    Download & Install plugin  :-

    http://exchange.nagios.org/directory/Plugins/Network-Connections,-Stats-and-Bandwidth/check_tcptraffic/details24

    $ wget check_tcptraffic-2.2.3.tar.gz
    $ tar -zxf check_tcptraffic-2.2.3.tar.gz
    $ cd check_tcptraffic-2.2.3
    In the source directory run:
    $ perl Makefile.PL
    $ make
    $ make install

    Client server nrpe.cfg

    command[check_traffic]=/usr/lib64/nagios/plugins/check_tcptraffic-2.2.3/check_tcptraffic  -c <value>  -w <value > -i eth0 -s 100

    $ /etc/init.d/nrpe restart

    Nagios Server/Services config

    define service {
    service_description         Server Bandwidth Usage
    hosts                           adminlogs.info
    normal_check_interval     5
    retry_check_interval       1
    contact_groups              admins
    notification_interval        60
    notification_period          wakinghours
    check_command             nrpe_check!check_traffic
    use                              generic-service
    }

    Verify the nagios conf and restart nagios

    $ nagios -v /etc/nagios/nagios.cfg

    $ /etc/init.d/nagios restart

    Yes , that’s it. You can relax , Nagios will alert you about your server bandwidth usage 🙂