forked from mojombo/god
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Announce.txt
135 lines (90 loc) · 4.43 KB
/
Announce.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Subject: [ANN] god 0.6.0 released (and mailing list)
!!!NEW MAILING LIST!!! We now have a mailing list at http://groups.google.com/group/god-rb
This release is primarily focused on increased stability, robustness, and code cleanliness.
The last release (0.5.0) switched from TCP sockets to Unix Domain Sockets for the CLI tools. There were some issues regarding file descriptors that would cause god to hang when restarting (the unix socket was being held open by spawned processes). These problems are all fixed in 0.6.0. You may need to kill any processes that were started under god 0.5.0 when you upgrade to 0.6.0 (you will only need to do this once during the upgrade process).
More attention is now paid to Syslogging behavior.
God will delete its own PID file when terminated via a user request.
A new command line option now allows you to check whether your installation properly handles events (sometimes the C extension will compile ok, but still not support events. Gentoo, I'm looking at you). Run `god check` to see an attempt to use the event system. It will tell you if your installation does not support events.
A watch can now be removed entirely at runtime using `god remove <watch name>`.
A new condition DiskUsage allows you to check the available disk space on a given volume.
Updated documentation is now available on the website:
http://god.rubyforge.org/
WHAT IS GOD?
God is an easy to configure, easy to extend monitoring framework written in Ruby.
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.
DISCLAIMER
God is still beta so I do not yet recommend you use it for mission critical tasks. We are using it at Powerset, Inc. to monitor our public facing applications, but then, we're daring fellows.
INSTALL
sudo gem install god
FEATURES
* 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
* Easily control non-daemonized processes
EXAMPLE
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:
# run with: god -c /path/to/gravatar.god
#
# This is the actual config file used to keep the mongrels of
# gravatar.com running.
RAILS_ROOT = "/Users/tom/dev/gravatar2"
%w{8200 8201 8202}.each do |port|
God.watch do |w|
w.name = "gravatar2-mongrel-#{port}"
w.interval = 30.seconds # default
w.start = "mongrel_rails start -c #{RAILS_ROOT} -p #{port} \
-P #{RAILS_ROOT}/log/mongrel.#{port}.pid -d"
w.stop = "mongrel_rails stop -P #{RAILS_ROOT}/log/mongrel.#{port}.pid"
w.restart = "mongrel_rails restart -P #{RAILS_ROOT}/log/mongrel.#{port}.pid"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid")
w.behavior(:clean_pid_file)
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 5.seconds
c.running = false
end
end
w.restart_if do |restart|
restart.condition(:memory_usage) do |c|
c.above = 150.megabytes
c.times = [3, 5] # 3 out of 5 intervals
end
restart.condition(:cpu_usage) do |c|
c.above = 50.percent
c.times = 5
end
end
# lifecycle
w.lifecycle do |on|
on.condition(:flapping) do |c|
c.to_state = [:start, :restart]
c.times = 5
c.within = 5.minute
c.transition = :unmonitored
c.retry_in = 10.minutes
c.retry_times = 5
c.retry_within = 2.hours
end
end
end
end
DOCS
Detailed documentation is available at http://god.rubyforge.org/
CHANGES
== 0.6.0 / 2007-12-4
* Minor Enhancement
* Move Syslog calls into God::Logger and clean up all calling code
* Remove god's pid file on user requested termination
* Better handling and cleanup of DRb server's unix domain socket
* Allow shorthand for requesting a god log
* Add `god check` to make it easier to diagnose event problems
* Refactor god binary into class/method structure
* Implement `god remove` to remove a Task altogether
* New Conditions
* DiskUsage < PollCondition - trigger if disk usage is above limit on mount [Rudy Desjardins]
AUTHORS
Tom Preston-Werner
Kevin Clark