NCSA Plugin Wrapper

mitchell perilstein mitch at acetechgroup.com
Wed Jul 21 13:57:33 CEST 2004


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);

See "perldoc -f close" for details.

-- 
Mitchell Perilstein
ACE Technology Group, LLC
http://www.acetechgroup.com
866-229-1543 x11



-------------------------------------------------------
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_id=4721&alloc_id=10040&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