Problem sending passive results using NSCA with multi-line output

Tech Support support at voipbusiness.us
Wed Feb 13 17:58:27 CET 2013


All;

    I have a bunch of ( PERL ) plugins that are run passively out of CRON
with the results sent to the Nagios monitoring host using NSCA. Most of them
work great, and they return results on dozens of services. I'm doing it this
way because instead of running dozens of plugins actively, I can run one
plugin passively. The problem is I have a few that are choking when the
output contains multi-line output, and I'm not sure how to get around that.
Basically, my scripts look something like this:

 

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.
Does anyone have any insight at all on how I can get around this? Any help
at all would be greatly appreciated.

Thanks;

John

Tech Support

Technical Support

VoIP Business Solutions

240-215-3479, ext. 305

 <mailto:fsd at voipbusiness.us> support at voipbusiness.us

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20130213/f8a6e507/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- 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