Problem sending passive results using NSCA with multi-line output

Tech Support support at voipbusiness.us
Sat Feb 16 17:09:39 CET 2013


I updated to version 2.9.1 and it works like a charm. Thanks!
John

-----Original Message-----
From: Holger Weiß [mailto:holger at cis.fu-berlin.de] 
Sent: Wednesday, February 13, 2013 6:32 PM
To: Nagios Users
Subject: Re: [Nagios-users] Problem sending passive results using NSCA with
multi-line output

* Tech Support <support at voipbusiness.us> [2013-02-13 11:58]:
> foreach my $service ( @services ) {
> 
>     <Blah, Blah, Blah, do some stuff>
> 
>     $nsca_cmd .= "$nscahost\t$service\t$code\t$output";
> 
> };
> 
> my $retval = `$system /bin/echo -e "$nsca_cmd" | $nscaprog -H 
> $nagioshost -c $nscacfg`;
> 
> Like I said, Nagios is choking when the output contains multi-line output.

This looks like you're using a send_nsca version < 2.9, where multiple check
results were seperated using newlines.  In that case, you'll have to replace
each newline character within multi-line output with the literal string
'\n'.

With NSCA >= 2.9, multiple check results are seperated using ASCII ETB
characters (octal value: 27) instead of newlines, and multi-line output can
be piped into send_nsca as-is.  (Actually, converting the newline characters
into '\n' will no longer work with NSCA >= 2.9.)

Holger

----------------------------------------------------------------------------
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 and get the
hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
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


------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
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