Service event handler script not activating
Darren Spruell
phatbuckett at gmail.com
Sat Nov 15 19:51:29 CET 2008
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
--
Darren Spruell
phatbuckett at gmail.com
-------------------------------------------------------------------------
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