Service event handler script not activating

hiren hir3npatel at gmail.com
Sun Nov 16 02:33:57 CET 2008


On Sat, 2008-11-15 at 11:51 -0700, Darren Spruell wrote:
> On Sat, Nov 15, 2008 at 12:08 AM, Dennis Hünseler
> <dennis at huenseler.net> wrote:
> > did you check the commands on command line as root or as nagios
> user?
> > Because i think your problem is the user which runs the commands.
> 
> Yes, run as the nagios user. You can see that the eventhandler script
> also invokes the remote command with sudo which allows the remote
> _nrpe user to (re)start the service:
> 
> > $ su - nagios
> > $ sh -x
> /usr/lib64/nagios/plugins/eventhandlers/service-restart-openbsd.sh
> > quagmire.local _nrpe CRITICAL HARD 4 start-argus
> > + DST_HOST=quagmire.local
> > + DST_USER=_nrpe
> > + SVC_STATE=CRITICAL
> > + SVC_STATE_TYPE=HARD
> > + SVC_STATE_ATTEMPT=4
> > + SVC_NAME=start-argus
> > + case "$SVC_STATE" in
> > + case "$SVC_STATE_TYPE" in
> > + /usr/bin/ssh -tt -l _nrpe quagmire.local sudo
> /usr/local/bin/start-argus
> > Connection to quagmire.local closed.
> > + exit 0

I have similar strangeness, though I haven't looked into it thoroughly
enough as yet. I also use 2.x server. is nagios not able to log the
return status of the commands it runs in handlers? one can put nagios
into debug mode to log the full command it runs right? anyway I think my
issue might be that I'm using macros not available in handler commands,
will check when I get to work on Monday. cheers.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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