monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Multiple instances of Monit on one machine


From: Jan-Henrik Haukeland
Subject: Re: [monit] Multiple instances of Monit on one machine
Date: Fri, 12 Sep 2008 14:56:46 +0200

You can place Monit pid files specified with the -p switch wherever you want and call them whatever you want. This is true as long as the user starting Monit has write access to the specified file path.

E.g. monit -p /some/directory/mymonit.pid

Monit will then create the file mymonit.pid in /some/directory/ as long as it has write access to that directory. BTW each user/process should specify a different HTTP port number in their own monitrc control file so there is no clash there.

NOTE. If the same user is going to start different Monit instances, you may also want to investigate the -c switch to Monit which allows you to specify different monitrc control files. And since you can specify the pid-file in your monitrc control file also, by using "set pidfile" you can then drop using -p and only use different monitrc files.


On 12. sep.. 2008, at 14.39, Moshe Cohen wrote:

But that does not discuss where you can and where you cannot place your own lock files (the -p argument)

On Fri, Sep 12, 2008 at 3:35 PM, Jan-Henrik Haukeland <address@hidden > wrote:
The Monit pid-file is discussed briefly here 
http://www.tildeslash.com/monit/doc/manual.php#files


On 12. sep.. 2008, at 13.58, Moshe Cohen wrote:

After some further playing around, I noticed that the default file is placed in the home directory (which just happened to be my current directory).
Stating the file as ~/xxx   works.

What are the exact rules for legal lock files ?


On Fri, Sep 12, 2008 at 2:07 PM, Moshe Cohen <address@hidden> wrote:
Thanks.

Followup question:

starting monit regularly (no -p) works and creates a .monit.pid file in the current directory starting another instance with "-p xxx" fails and the log says there is no permission to create the file. ( -p /tmp/xxx works, though. )

How come the default PID file is created but the specified one has no permission - both on same current directory ?

TIA
Moshe


On Fri, Sep 12, 2008 at 7:58 AM, Jan-Henrik Haukeland <address@hidden > wrote:
Just specify a different pidfile using the -p switch to Monit


On 11. sep.. 2008, at 22.59, Moshe Cohen wrote:

How can I run more than one instances of Mon it on the same machine?

Currently, starting a new Monit instance just awakens the existing daemon of the existing instance.

Moshe



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


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


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

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





reply via email to

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