Event handler OK from command line, not from nagios

Andreas Ericsson ae at op5.se
Thu Jul 8 02:06:49 CEST 2004


Glenn A. Meisenheimer wrote:
> Friends,
> 
> My problem is this.  The print spooler on a Win 2k machine keeps hanging 
> up.
> Remedial action typically requires a sysadmin to stop and restart the 
> print  spooler
> 

[....]

> Any help would be appreciated...
> 

Add the following lines close to the top of your eventhandler script;
[ -d /tmp/events ] || mkdir /tmp/events
echo "$@" > /tmp/events/${0##/*}.$$
exec 1>& /tmp/events/${0##/*}.$$
exec 2>& /tmp/events/${0##/*}.$$

Then rip the paper tray and watch the eventhandler execute. 
/tmp/events/* will be logfiles with complete output of every argument 
passed and every action taken (be aware that stderr usually isn't 
buffered, while stdout normally is, so output may come in whacky order 
if things go amiss a whole lot).


> Glenn Meisenheimer
> 

-- 
Sourcerer / Andreas Ericsson
OP5 AB
+46 (0)733 709032
andreas.ericsson at op5.se


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
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