Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 110 lines (72 sloc) 3.533 kb
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
1 Subject: [ANN] god 0.2.0 released
01467de implemented state based lifecycle
Tom Werner authored
2
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
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:
01467de implemented state based lifecycle
Tom Werner authored
4
5 http://god.rubyforge.org/
6
7
8 WHAT IS GOD?
9
10 God is an easy to configure, easy to extend monitoring framework written in Ruby.
11
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.
13
14
15 DISCLAIMER
16
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.
18
19
20 INSTALL
21
22 sudo gem install god
23
24 * note: currently tested only on Redhat Linux and Darwin (won't work on Windows)
25
26
27 FEATURES
28
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
33
34
35 EXAMPLE
36
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:
38
39 # file: gravatar.god
40 # run with: god start -c /path/to/gravatar.god
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
41 #
01467de implemented state based lifecycle
Tom Werner authored
42 # This is the actual config file used to keep the mongrels of
43 # gravatar.com running.
44
45 RAILS_ROOT = "/var/www/gravatar2/current"
46
47 God.meddle do |god|
48 %w{8200 8201 8202}.each do |port|
49 god.watch do |w|
50 w.name = "gravatar2-mongrel-#{port}"
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
51 w.interval = 30 # seconds default
01467de implemented state based lifecycle
Tom Werner authored
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
63
64 w.start_if do |start|
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
65 start.condition(:process_running) do |c|
01467de implemented state based lifecycle
Tom Werner authored
66 c.interval = 5 # seconds
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
67 c.running = false
01467de implemented state based lifecycle
Tom Werner authored
68 c.pid_file = pid_file
69 end
70 end
71
72 w.restart_if do |restart|
73 restart.condition(:memory_usage) do |c|
74 c.pid_file = pid_file
75 c.above = (150 * 1024) # 150mb
76 c.times = [3, 5] # 3 out of 5 intervals
77 end
78
79 restart.condition(:cpu_usage) do |c|
80 c.pid_file = pid_file
81 c.above = 50 # percent
82 c.times = 5
83 end
84 end
85 end
86 end
87 end
88
89
90 DOCS
91
92 Detailed documentation is available at http://god.rubyforge.org/
93
94
95 CHANGES
96
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
97 == 0.2.0 / 2007-07-18
01467de implemented state based lifecycle
Tom Werner authored
98
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
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
01467de implemented state based lifecycle
Tom Werner authored
104
105
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
106 AUTHORS
01467de implemented state based lifecycle
Tom Werner authored
107
108 Tom Preston-Werner
2042f67 @mojombo updated announce email and history for 0.2.0 release
mojombo authored
109 Kevin Clark
Something went wrong with that request. Please try again.