Capturing perf data from check_snmp

Chris Wilson chris at aidworld.org
Fri Apr 15 15:32:17 CEST 2005


Hi James,

> I still don't know how to catch a return code from the plugin, but by
> doing some string comparisons on the plugin output I can generate a
> return code from the perl wrapper.

Capture the value of the built-in special variable $? immediately after
executing the command, and shift right by 8 bits ($? >> 8).

Cheers, Chris.
-- 
(aidworld) chris wilson | chief engineer (chris at aidworld.org)



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&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