monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit] using monit to monitor services of another user


From: Jan-Henrik Haukeland
Subject: Re: [monit] using monit to monitor services of another user
Date: Wed, 02 Jul 2008 18:48:49 +0200

No problem, if you run monit as root you can still start programs as another user. Simply use the 'as uid and gid' sub-statements to start, stop and exec. For example

 check process tomcat with pidfile /var/run/tomcat.pid
       start program = "/etc/init.d/tomcat start"
             as uid nobody and gid nobody
       stop program  = "/etc/init.d/tomcat stop"
             # You can also use id numbers instead and write:
             as uid 99 and with gid 99
       if failed port 8080 then alert


On 2. juli. 2008, at 13.07, sohail khan wrote:

Hi
I am using monit to monitor apache and mysql. Monit is running as non root user. Now I want to monitor a service running under root user. If I install Monit under root user then how can I monitor the services running under non-root user.

I don't want to run two monits i.e One running under root user and one running under non-root user.
Sohail.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]