monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Group handling not working


From: Martin Pala
Subject: Re: [monit] Group handling not working
Date: Thu, 24 Jan 2008 21:08:04 -0800

... fixed in cvs, when group is specified, the "all" is no longer required.

Martin


On Jan 24, 2008, at 9:05 PM, Martin Pala wrote:

Monit status command doesn't support the groups currently (may be added in the future) ... just following commands work with the group:

start
stop
restart
monitor
unmonitor


When group is used with the above commands, you have to add yet the service name or "all", like this:

monit -g mongrels_web stop all

The "all" was added as safeguard to prevent unintentional stop of all services when the user will call just "monit stop" -> we've added the "all" so the "monit stop all" makes sure that the user really wan't to stop all services.

In the case that the group is specified the "all" makes probably no sense, since the probability of mistake is minimal.


=> we should allow start/stop/restart/etc. without "all" when group is specified


Martin



On Jan 24, 2008, at 10:25 AM, Sean Brown wrote:

I've got a couple of groups in my monit config:

check process mongrel_web_8905
with pidfile /www/current/log/mongrel.8905.pid
start program = "/bin/mongrel_launcher 8905
/www/current/config/mongrel_cluster.yml start"
stop program = "/bin/mongrel_launcher 8905
/www/current/config/mongrel_cluster.yml stop"
if totalmem is greater than 100.0 MB for 4 cycles then restart
if cpu is greater than 50% for 2 cycles then alert
if cpu is greater than 80% for 3 cycles then restart
if loadavg(5min) greater than 10 for 8 cycles then restart
if 20 restarts within 20 cycles then timeout
group mongrels_web

check process mongrel_web_8906
with pidfile /www/current/log/mongrel.8906.pid
start program = "/bin/mongrel_launcher 8906
/www/current/config/mongrel_cluster.yml start"
stop program = "/bin/mongrel_launcher 8906
/www/current/config/mongrel_cluster.yml stop"
if totalmem is greater than 100.0 MB for 4 cycles then restart
if cpu is greater than 50% for 2 cycles then alert
if cpu is greater than 80% for 3 cycles then restart
if loadavg(5min) greater than 10 for 8 cycles then restart
if 20 restarts within 20 cycles then timeout
group mongrels_web

However, if I try to start, stop, restart or get a status using the
group option, I get this:

# monit -g mongrels_web stop
monit: please specify the configured service name or 'all' after stop

If I do:
# monit -g mongrels_web status, it prints out the status for ALL of my
services, not just this group.

I've tried this on both monit 4.9 and 4.10.1 with the same result.

Any ideas?

Sean


--
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]