check_iftraffic.pl plugin

Alex Dehaini alexdehaini at gmail.com
Thu Oct 11 17:17:07 CEST 2007


Hi Guys,

I need some help on how to use the check_iftraffic.pl plug in. I want nagios
to notify me if any of my servers reach a 150kbits/sec on their NIC. This is
what I have done so far.

1. I downloaded the plug in and gave it the appropriate ownership and
permissions.
2. I added the plugin to the command.cfg file and this is what I added to
the file

# 'check_iftraffic' command definition
define command{
        command_name    check_iftraffic
        command_line    $USER1$/check_iftraffic.pl -H $HOSTADDRESS$ -C
$USER3$ -i $ARG1$ -b $ARG2$ -u m
        }

3. I added the following service to one of my linux servers that has a NIC
named eth0, this is what I added

define service{
        use                             dns1-service
        host_name                       DNS2
        service_description             Traffic Load eth0
        check_command                   check_iftraffic!community!eth0!100
        }

After these, nagios report an unknown error for this service on the web cgi
interface, nagios says:

DNS1<http://nagios.teledataict.com/nagios/cgi-bin/extinfo.cgi?type=1&host=DNS1>
   [image:
DNS Servers]<http://nagios.teledataict.com/nagios/cgi-bin/extinfo.cgi?type=1&host=DNS1>
    Traffic
Load eth0<http://nagios.teledataict.com/nagios/cgi-bin/extinfo.cgi?type=2&host=DNS1&service=Traffic+Load+eth0>
  [image:
Notifications for this service have been
disabled]<http://nagios.teledataict.com/nagios/cgi-bin/extinfo.cgi?type=2&host=DNS1&service=Traffic+Load+eth0>
UNKNOWN 10-11-2007 15:10:44 0d 0h 2m 22s 3/6 (No output!)
Can anyone please assist me. When I run this from the plug in directory, I
get results, forexample

snmp:/usr/local/nagios/libexec# ./check_iftraffic.pl -H 41.211.0.42 -C
community -i eth0 -b 100 -u m
Total RX Bytes: 1381.80 MB, Total TX Bytes: 2155.67 MB<br>Average Traffic:
10.23 kB/s (0.1%) in, 12.45 kB/s (0.1%) out| inUsage=0.1,85,98
outUsage=0.1,85,98
inAbsolut=1410835 outAbsolut=2202385




-- 
Alex Dehaini
Developer
Site - www.alexdehaini.com
Email - alexdehaini at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071011/909a11a7/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list