1 Subject: [ANN] god 0.2.0 released
3 A lot of work has gone into god since the last release. Say goodbye to polling for process status--support for event based conditions via kqueue/netlink has been added (thanks Kevin Clark)! Only a few events are currently supported (most prominently process exit), but the way is now open for the addition of other events. A new, advanced syntax is available (in addition to the familiar simple syntax) that gives you full power over the new state based lifecycle of your Watches. Updated documentation is available on the website:
5 http://god.rubyforge.org/
10 God is an easy to configure, easy to extend monitoring framework written in Ruby.
12 Keeping your server processes and tasks running should be a simple part of your deployment process. God aims to be the simplest, most powerful monitoring application available.
17 God is still very young, I'd love to get feedback and bug reports, but I do not yet recommend you use it for mission critical tasks. I personally use it in production but then I'm a daring fellow.
24 * note: currently tested only on Redhat Linux and Darwin (won't work on Windows)
29 * Config file is written in Ruby
30 * Easily write your own custom conditions in Ruby
31 * Supports both poll and event based conditions
32 * Different poll conditions can have different intervals
37 The easiest way to understand how god will make your life better is by looking at a sample config file. The following configuration file is what I use at gravatar.com to keep the mongrels running:
40 # run with: god start -c /path/to/gravatar.god
42 # This is the actual config file used to keep the mongrels of
43 # gravatar.com running.
45 RAILS_ROOT = "/var/www/gravatar2/current"
48 %w{8200 8201 8202}.each do |port|
50 w.name = "gravatar2-mongrel-#{port}"
51 w.interval = 30 # seconds default
52 w.start = "mongrel_rails cluster::start --only #{port} \
53 -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
54 w.stop = "mongrel_rails cluster::stop --only #{port} \
55 -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
56 w.grace = 10 # seconds
58 pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid")
60 w.behavior(:clean_pid_file) do |b|
65 start.condition(:process_running) do |c|
66 c.interval = 5 # seconds
72 w.restart_if do |restart|
73 restart.condition(:memory_usage) do |c|
75 c.above = (150 * 1024) # 150mb
76 c.times = [3, 5] # 3 out of 5 intervals
79 restart.condition(:cpu_usage) do |c|
81 c.above = 50 # percent
92 Detailed documentation is available at http://god.rubyforge.org/
99 * Rewrote innards to use a state and event based lifecycle
100 * Basic support for events via kqueue (bsd/darwin) and netlink/pec (linux) [kevinclark]
101 * Added advanced syntax (simple syntax calls advanced api underneath)
102 * Condition returns have changed meaning. With simple syntax, a true return activates block
103 * Updated http://god.rubyforge.org with updated simple config and new advanced config