monit-general
[Top][All Lists]
Advanced

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

[monit] [FEATURE REQUEST] Multiple Groups


From: Brad Gessler
Subject: [monit] [FEATURE REQUEST] Multiple Groups
Date: Sat, 25 Jul 2009 12:46:44 -0700

Monit has been nothing but awesome for the past few months after we switched over from God (a horrendous process monitor that makes fun of Monit in its tag line. I set the record straight at http://blog.bradgessler.com/tag/godprocessmonitor)

The only clunky thing I've been dealing with is groups. We run multiple instances of thin web servers for various customers. At times we need to restart all of the thin web servers, at other times we need to only restart a specific clients set of thin web servers. Unfortunately a monit process can only belong to one group (unless I'm missing something).

I'd like to be able to config our app monitoring as such:

check process company_a_thin_5000
        with pidfile /var/run/thin.5000.pid
        start = "/usr/bin/env RAILS_ENV=production APP_SLICE=company_a thin --port 5000 --rackup /home/company_a/web/current/config.ru --log /home/company_a/web/current/log/thin.log --pid /var/run/thin.5000.pid --daemonize start"
        stop = "/usr/bin/env thin --pid /var/run/thin.5000.pid stop"
        if totalmem > 200.0 MB for 3 cycles then restart
        if 5 restarts within 5 cycles then timeout
        group company_a
        group thin

check process company_b_thin_6000
        with pidfile /var/run/thin.5000.pid
        start = "/usr/bin/env RAILS_ENV=production APP_SLICE=company_b thin --port 5000 --rackup /home/company_b/web/current/config.ru --log /home/company_b/web/current/log/thin.log --pid /var/run/thin.5000.pid --daemonize start"
        stop = "/usr/bin/env thin --pid /var/run/thin.5000.pid stop"
        if totalmem > 200.0 MB for 3 cycles then restart
        if 5 restarts within 5 cycles then timeout
        group company_b
        group thin

and issue these types of restart commands:

monit -g thin restart

monit -g company_b restart

This would allow us to perform software upgrades easier across our clients applications and help us deploy patches to specific clients much more effectively.

Thanks for hearing me out and for the great piece of software!

-- 
Brad Gessler
Poll Everywhere, Inc.
address@hidden

reply via email to

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