capturing $LONGSERVICEOUPUT$ from custom plugins

Marc Powell marc at ena.com
Mon Oct 5 18:04:43 CEST 2009


Please always respond on list. More below --

On Oct 5, 2009, at 10:45 AM, Noel Platzke wrote:

> I'm looking for it to be captured in the $LONGSERVICEOUTPUT$ macro.  
> Where else would it be?

That will capture anything after the first line of text but if you're  
looking for it as part of a host notification (or elsewhere it's not  
supported), you're not going to find it. That's what I meant by 'where/ 
how are you looking for it'.

> All I'm doing is writing plaintext output to stdout but for some  
> reason nagios isn't picking it up. If I run the script by hand it  
> prints to stdout. If I change the output to a file it writes to the  
> file fine. But if the script is invoked by nagios it never sees the  
> output.

Does $SERVICEOUTPUT$ capture the first line of output of your script?  
If not, you probably need to provide more specific detail about nagios  
version, how you're calling your plugin from nagios (command{}  
definition, etc) and specifically how it's providing it's output for  
nagios to capture. The assumption to this point is that nagios is  
calling the plugin directly. Other methods can yield different results.

--
Marc


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
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