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:supp...@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
supp...@voipbusiness.us<mailto:f...@voipbusiness.us>
------------------------------------------------------------------------------
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@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