check_iftraffic.pl plugin

Marc Powell marc at ena.com
Thu Oct 11 17:38:03 CEST 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Alex Dehaini
> Sent: Thursday, October 11, 2007 10:17 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] check_iftraffic.pl plugin 
> 
> 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.

When asking questions about a non-standard plugin, it's very helpful to
provide specific details about where you got it from. How do we know the
check_iftraffic.pl that google tells us about as the top hit is the same
one you're using?



> UNKNOWN	 10-11-2007 15:10:44	 0d 0h 2m 22s	 3/6	 (No
output!)

"NO output!" typically means the plugin is reporting errors.

> 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

This implies a permissions issue. Testing as root isn't useful since
nagios isn't running the plugin as root. Do the same test again, except
as the nagios user. I'll bet you get different and more informative
results.



I'm going to take a very arbitrary guess and assume that I'm looking at
the same plugin as you. It uses a temporary file, hard-coded as
/tmp/traffic. Based on your test above, that file is almost certainly
owned by root and probably isn't modifiable by the nagios user. Change
ownership/permissions of the file or remove it entirely, then test again
as the nagios user.

--
Marc


-------------------------------------------------------------------------
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/
_______________________________________________
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