NCSA Plugin Wrapper

Benoit Panizzon Benoit.Panizzon at imp.ch
Wed Jul 21 14:37:08 CEST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Mittwoch, 21. Juli 2004 13.57 schrieb mitchell perilstein:
> Benoit Panizzon wrote:
> >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?
>
> Look at the return value when you close the file handle:
>     $status = close(READ);

Argh, there it is hidden. Thank you!

- -- 
Benoît Panizzon, <bp at imp.ch>
- ------------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP                     Phone: +41 61 826 93 00
Zurlindenstrasse 29                            Fax:   +41 61 826 93 01
CH-4133 Pratteln                               Net:   http://www.imp.ch/
- ------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA/mN0CVq2G/yL7/ARAkvxAJ4lokYAVk3/8fluCubHWnnXAbi4dQCg5mJY
+z0fK54q/HPBYm6j4zY17Vg=
=+onH
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click
_______________________________________________
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