Problem sending passive results using NSCA with multi-line output

Stuart Browne stuart.browne at ausregistry.com.au
Wed Feb 13 23:27:11 CET 2013


Sadly, the way NSCA works at the moment isn't capable of doing multi-line responses (when I investigated about 6 months ago at least) as it uses the external command file (which is a single-line command/response FIFO).

What I ended up doing to simulate the behaviour was to implement gearman/mod_gearman.  It has a send_gearman utility that allows for multi-line passive result submissions.

Stuart

From: Tech Support [mailto:support at voipbusiness.us]
Sent: Thursday, 14 February 2013 3:58 AM
To: 'Nagios Users List'
Subject: [Nagios-users] Problem sending passive results using NSCA with multi-line output

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
support at voipbusiness.us<mailto:fsd at voipbusiness.us>




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