NCSA Plugin Wrapper

joerg.helmert at aracomp.de joerg.helmert at aracomp.de
Thu Jul 22 01:33:51 CEST 2004


> On Behalf Of Benoit Panizzon
> 
> Hi all
> 
> As I got no replies at all on how to report a plugin's output 
> via NSCA I
> started writing a wrapper myself but as I'm not a perl coder I have
> some troubles.
> 
> I do a open(READ, "plugin args |");
> and read the plugin output into $poutput;
> 
> open(WRITE, "| nsca");
> print($host\t$service\t$status\t$poutput\n");
> 
> But how the hell do I read the exit code from the plugin with 
> open which I
> need to fill the $status needed for nsca?
> 
> - -Benoit-
> 
Hi Benoit,

Hoped somebody has something finished.
Had the same problem but decided to use a shell script as wrapper.
Saves the need to install something like perl.

Attached you find a shell script check_nsca which reads what to do
out of its config file (example nsca.cfg attached)
I run check_nsca from cron every 5 minutes. (see attached crontab.txt)
So the example nsca.cfg means that a single crontab entry performs
6 different checks every 5 minutes and sends results to nsca-daemon

Be warned. I still have to tidy up. Some error checking is done,
usage and help still missing.
Wanted to change config file format so that commands can be
defined the same way as if u were using nrpe.
Wanted to tidy up before posting. But since u asked...

I don't have the time to work on this at the moment.
It works as is for me without problems.
So if you complete your wrapper, please keep me informed.

Bye,

Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 20057 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040722/2e5ff8b3/attachment.bin>


More information about the Users mailing list