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: sohail khan
Subject: Re: [monit] using monit to monitor services of another user
Date: Thu, 3 Jul 2008 01:33:54 -0700 (PDT)

Thank You Haukeland. Its simple and worked.

--- On Wed, 7/2/08, Jan-Henrik Haukeland <address@hidden> wrote:
From: Jan-Henrik Haukeland <address@hidden>
Subject: Re: [monit] using monit to monitor services of another user
To: "This is the general mailing list for monit" <address@hidden>
Date: Wednesday, July 2, 2008, 9:48 PM

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.



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

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