execute command as root user
Martin Koeck
lists at brainwork.at
Mon Jul 23 12:37:06 CEST 2007
Hello,
I know this is more OS related and not so much nagios related, but I
thought maybe somebody has stumbled across this:
I need, on a critical failure that is trapped by nagios (this works for
me), to restart an application which I usually restart as root user on
this machine.
To be specific: Tomcat is giving up work now and then on this machine, I
can trap it, and need to restart it. Normally I do this by
/etc/init.d/tomcat restart -- but I need to be root for this, so nagios
cannot do this automatically for me, because it runs as nagios user.
What is the best way to approach this ? Changing the owner of the
tomcat-related startup files so that nagios can do it ? Writing a file
on-critical-error and restarting tomcat (as a cron-job), whenever that
file exists ? Something else ?
Regards,
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.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