Check_mrtgtraf

Andreas Ericsson ae at op5.se
Tue Mar 30 09:41:55 CEST 2004


Al McKay wrote:
> Andreas Ericsson <ae <at> op5.se> writes:
> 
> 
>>Run the script manually with the same parameters as nagios does. That 
>>should give you a pretty good clue.
>>
>>Mckay, Al wrote:
>>
>>>I am running mrtg to monitor switches and routers on my network. The data 
> 
> is
> 
>>>being compiled on a 5 minute cycle. I am using check_mrtgtraf to monitor 
> 
> for
> 
>>>traffic volumes and notifying when traffic reaches certain levels. I am
>>>getting periodic "No Output!" messages from the check command. I don't
>>>understand how this can be happening since the mrtg and Nagios are both
>>>running on the same server.
>>>
>>>Any help would be appreciated.
>>>
>>>Al McKay
> 
> 
> I have run the commands manually and sometimes I get a response and sometimes 
> I dont. I ma completely stumped on this. The log files from te MRTG checks are 
> all rw-r--r-- so it cant be a permissions problem. Any further suggestions are 
> appreciated.
> 
> Al McKay
> 

Is the output on the first line of output, or are there blank lines 
before the 'actual' output? If so, then you can write a wrapping script 
around it, like so;

--[ cut here ]---
#!/bin/sh

cmd=<whatever-script-you're-running>
$cmd "$@" 2>&1 | grep -v ^$

exit $?
--[ cut here ]---

By adding the "2>&1" thingie, you redirect stderr to stdout, so you can 
catch any error-messages (well, the first line of it anyways). That 
should be useful while you're debugging.

-- 
Mvh / Best Regards
Sourcerer / Andreas Ericsson
OP5 AB
+46 (0)733 709032
andreas.ericsson at op5.se


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
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