simple mode works
[god.git] / Announce.txt
blobb15983cfaefec5cd1c49f99d7196e3969afa84b0
1 Subject: [ANN] god X.X.X released
3 I'm proud to announce the initial public release of god!
5   http://god.rubyforge.org/
8 WHAT IS GOD?
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.
15 DISCLAIMER
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.
20 INSTALL
22 sudo gem install god
24 * note: currently tested only on Redhat Linux and Darwin (won't work on Windows)
27 FEATURES
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
35 EXAMPLE
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:
39 # file:      gravatar.god
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"
47 God.meddle do |god|
48   %w{8200 8201 8202}.each do |port|
49     god.watch do |w|
50       w.name = "gravatar2-mongrel-#{port}"
51       w.interval = 30 # seconds
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
57       
58       pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid")
59       
60       w.behavior(:clean_pid_file) do |b|
61         b.pid_file = pid_file
62       end
64       w.start_if do |start|
65         start.condition(:process_not_running) do |c|
66           c.interval = 5 # seconds
67           c.pid_file = pid_file
68         end
69       end
70       
71       w.restart_if do |restart|
72         restart.condition(:memory_usage) do |c|
73           c.pid_file = pid_file
74           c.above = (150 * 1024) # 150mb
75           c.times = [3, 5] # 3 out of 5 intervals
76         end
77       
78         restart.condition(:cpu_usage) do |c|
79           c.pid_file = pid_file
80           c.above = 50 # percent
81           c.times = 5
82         end
83       end
84     end
85   end
86 end
89 DOCS
91 Detailed documentation is available at http://god.rubyforge.org/
94 CHANGES
96 == 0.1.0 / 2007-07-07
98 * 1 major enhancement
99   * Birthday!
102 AUTHOR
104 Tom Preston-Werner