god: Extensible Process Monitoring Framework
god monitors your server processes and tasks to make sure they run smoothly, and performs maintenance tasks (such as restarting your application servers) as necessary. This Ruby application is written by Tom Preston-Werner and serves similar functionality to, and inspired by, a popular tool called monit.
Among the features god provides include:
-
Config file is written in Ruby
Easily write your own custom conditions in Ruby
Supports both poll and event based conditions
Different poll conditions can have different intervals
Here's a part of an example config file used to monitor mongrel instances:
god.watch do |w| w.name = "gravatar2-mongrel-#{port}" w.interval = 30 # seconds w.start = "mongrel_rails cluster::start --only #{port} -C #{RAILS_ROOT}/config/mongrel_cluster.yml" w.stop = "mongrel_rails cluster::stop --only #{port} -C #{RAILS_ROOT}/config/mongrel_cluster.yml" w.grace = 10 # seconds ... end
Monit users (including myself) will instantly recognize the mapping between monit rules/tests and the ones in a god config file. The main difference and advantage is, because god uses the Ruby language, you can have all sorts of advanced tests, loops, and even include your own extensions like modules and mixins. God actually supports an official mechanism for this purpose.
Install god using Rubygems:
sudo gem install god -y
The god web page has thorough information and you can also browse the source code directly.
July 18, 2007 at 7:44 am
I don't believe in god
July 18, 2007 at 10:18 pm
Haven't they found a better name ?!
July 19, 2007 at 6:03 am
I don't understand all the hoopla around the name. A lot of supposedly intelligent people wasted a lot of their valuable time actually discussing this in ruby-talk and sent the S/N ratio through the floor. It's a name, much like Mongrel, Hpricot, or that any other Ruby library has.
July 19, 2007 at 6:10 am
Dear Nick and Tamer,
It seems a lot of people agree with you, as you're not the only one who says so. :-)
You might be interested at debates around the god monitoring framework. There's no bad time for a bit of entertainment. ;-)
July 20, 2007 at 4:11 am
god 0.2.0 is actually already out if you want to take a look. The new release features event based monitoring (straight from kqueue or netlink depending on your OS), so things can come back up as soon as they go down.
July 20, 2007 at 3:06 pm
Thanks Kevin for the update! :-)
July 22, 2007 at 2:43 am
More pointless wheel re-inventing by someone who drank too much Ruby kool-aid.