olgen-god 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. data/.gitignore +8 -0
  2. data/Announce.txt +135 -0
  3. data/History.txt +345 -0
  4. data/README.txt +59 -0
  5. data/Rakefile +69 -0
  6. data/VERSION.yml +4 -0
  7. data/bin/god +132 -0
  8. data/examples/events.god +84 -0
  9. data/examples/gravatar.god +54 -0
  10. data/examples/single.god +66 -0
  11. data/ext/god/.gitignore +5 -0
  12. data/ext/god/extconf.rb +55 -0
  13. data/ext/god/kqueue_handler.c +123 -0
  14. data/ext/god/netlink_handler.c +168 -0
  15. data/god.gemspec +226 -0
  16. data/ideas/execve/.DS_Store +0 -0
  17. data/ideas/execve/execve.c +29 -0
  18. data/ideas/execve/extconf.rb +11 -0
  19. data/ideas/execve/go.rb +8 -0
  20. data/ideas/future.god +82 -0
  21. data/init/god +42 -0
  22. data/init/lsb_compliant_god +109 -0
  23. data/lib/god/behavior.rb +52 -0
  24. data/lib/god/behaviors/clean_pid_file.rb +21 -0
  25. data/lib/god/behaviors/clean_unix_socket.rb +21 -0
  26. data/lib/god/behaviors/notify_when_flapping.rb +51 -0
  27. data/lib/god/cli/command.rb +255 -0
  28. data/lib/god/cli/run.rb +172 -0
  29. data/lib/god/cli/version.rb +23 -0
  30. data/lib/god/condition.rb +96 -0
  31. data/lib/god/conditions/always.rb +23 -0
  32. data/lib/god/conditions/complex.rb +86 -0
  33. data/lib/god/conditions/cpu_usage.rb +80 -0
  34. data/lib/god/conditions/degrading_lambda.rb +52 -0
  35. data/lib/god/conditions/disk_usage.rb +32 -0
  36. data/lib/god/conditions/file_mtime.rb +28 -0
  37. data/lib/god/conditions/flapping.rb +128 -0
  38. data/lib/god/conditions/http_response_code.rb +168 -0
  39. data/lib/god/conditions/lambda.rb +25 -0
  40. data/lib/god/conditions/memory_usage.rb +82 -0
  41. data/lib/god/conditions/ping.rb +40 -0
  42. data/lib/god/conditions/process_exits.rb +72 -0
  43. data/lib/god/conditions/process_running.rb +74 -0
  44. data/lib/god/conditions/tries.rb +44 -0
  45. data/lib/god/configurable.rb +57 -0
  46. data/lib/god/contact.rb +106 -0
  47. data/lib/god/contacts/campfire.rb +83 -0
  48. data/lib/god/contacts/email.rb +95 -0
  49. data/lib/god/contacts/jabber.rb +127 -0
  50. data/lib/god/contacts/sms.rb +96 -0
  51. data/lib/god/contacts/twitter.rb +39 -0
  52. data/lib/god/contacts/webhook.rb +47 -0
  53. data/lib/god/dependency_graph.rb +41 -0
  54. data/lib/god/diagnostics.rb +37 -0
  55. data/lib/god/driver.rb +207 -0
  56. data/lib/god/errors.rb +24 -0
  57. data/lib/god/event_handler.rb +111 -0
  58. data/lib/god/event_handlers/dummy_handler.rb +13 -0
  59. data/lib/god/event_handlers/kqueue_handler.rb +17 -0
  60. data/lib/god/event_handlers/netlink_handler.rb +13 -0
  61. data/lib/god/logger.rb +124 -0
  62. data/lib/god/metric.rb +59 -0
  63. data/lib/god/process.rb +352 -0
  64. data/lib/god/registry.rb +32 -0
  65. data/lib/god/simple_logger.rb +53 -0
  66. data/lib/god/smtp_tls.rb +55 -0
  67. data/lib/god/socket.rb +96 -0
  68. data/lib/god/sugar.rb +47 -0
  69. data/lib/god/system/portable_poller.rb +42 -0
  70. data/lib/god/system/process.rb +50 -0
  71. data/lib/god/system/slash_proc_poller.rb +92 -0
  72. data/lib/god/task.rb +503 -0
  73. data/lib/god/timeline.rb +25 -0
  74. data/lib/god/trigger.rb +43 -0
  75. data/lib/god/watch.rb +183 -0
  76. data/lib/god.rb +675 -0
  77. data/site/images/banner.jpg +0 -0
  78. data/site/images/bg.gif +0 -0
  79. data/site/images/bg_grey.gif +0 -0
  80. data/site/images/bullet.jpg +0 -0
  81. data/site/images/corner_green.gif +0 -0
  82. data/site/images/corner_green.psd +0 -0
  83. data/site/images/corner_pink.gif +0 -0
  84. data/site/images/god_logo.png +0 -0
  85. data/site/images/header_bg.gif +0 -0
  86. data/site/images/header_bg.jpg +0 -0
  87. data/site/images/red_dot.gif +0 -0
  88. data/site/images/top_bg.gif +0 -0
  89. data/site/index.html +563 -0
  90. data/site/install.html +2 -0
  91. data/site/javascripts/code_highlighter.js +188 -0
  92. data/site/javascripts/ruby.js +18 -0
  93. data/site/stylesheets/layout.css +174 -0
  94. data/test/configs/child_events/child_events.god +44 -0
  95. data/test/configs/child_events/simple_server.rb +3 -0
  96. data/test/configs/child_polls/child_polls.god +37 -0
  97. data/test/configs/child_polls/simple_server.rb +12 -0
  98. data/test/configs/complex/complex.god +59 -0
  99. data/test/configs/complex/simple_server.rb +3 -0
  100. data/test/configs/contact/contact.god +84 -0
  101. data/test/configs/contact/simple_server.rb +3 -0
  102. data/test/configs/daemon_events/daemon_events.god +37 -0
  103. data/test/configs/daemon_events/simple_server.rb +8 -0
  104. data/test/configs/daemon_events/simple_server_stop.rb +11 -0
  105. data/test/configs/daemon_polls/daemon_polls.god +17 -0
  106. data/test/configs/daemon_polls/simple_server.rb +6 -0
  107. data/test/configs/degrading_lambda/degrading_lambda.god +31 -0
  108. data/test/configs/degrading_lambda/tcp_server.rb +15 -0
  109. data/test/configs/lifecycle/lifecycle.god +25 -0
  110. data/test/configs/matias/matias.god +50 -0
  111. data/test/configs/real.rb +59 -0
  112. data/test/configs/running_load/running_load.god +16 -0
  113. data/test/configs/stress/simple_server.rb +3 -0
  114. data/test/configs/stress/stress.god +15 -0
  115. data/test/configs/task/logs/.placeholder +0 -0
  116. data/test/configs/task/task.god +26 -0
  117. data/test/configs/test.rb +61 -0
  118. data/test/helper.rb +139 -0
  119. data/test/suite.rb +6 -0
  120. data/test/test_behavior.rb +18 -0
  121. data/test/test_campfire.rb +41 -0
  122. data/test/test_condition.rb +50 -0
  123. data/test/test_conditions_disk_usage.rb +50 -0
  124. data/test/test_conditions_http_response_code.rb +109 -0
  125. data/test/test_conditions_process_running.rb +40 -0
  126. data/test/test_conditions_tries.rb +67 -0
  127. data/test/test_contact.rb +109 -0
  128. data/test/test_dependency_graph.rb +62 -0
  129. data/test/test_driver.rb +11 -0
  130. data/test/test_email.rb +45 -0
  131. data/test/test_event_handler.rb +80 -0
  132. data/test/test_god.rb +570 -0
  133. data/test/test_handlers_kqueue_handler.rb +16 -0
  134. data/test/test_jabber.rb +36 -0
  135. data/test/test_logger.rb +55 -0
  136. data/test/test_metric.rb +72 -0
  137. data/test/test_process.rb +247 -0
  138. data/test/test_registry.rb +15 -0
  139. data/test/test_socket.rb +34 -0
  140. data/test/test_sugar.rb +42 -0
  141. data/test/test_system_portable_poller.rb +17 -0
  142. data/test/test_system_process.rb +30 -0
  143. data/test/test_task.rb +246 -0
  144. data/test/test_timeline.rb +37 -0
  145. data/test/test_trigger.rb +59 -0
  146. data/test/test_watch.rb +279 -0
  147. data/test/test_webhook.rb +17 -0
  148. metadata +242 -0
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ coverage
2
+ pkg
3
+ *.log
4
+ logs
5
+ *.rbc
6
+ *~
7
+ .*.sw?
8
+ .DS_Store
data/Announce.txt ADDED
@@ -0,0 +1,135 @@
1
+ Subject: [ANN] god 0.6.0 released (and mailing list)
2
+
3
+ !!!NEW MAILING LIST!!! We now have a mailing list at http://groups.google.com/group/god-rb
4
+
5
+ This release is primarily focused on increased stability, robustness, and code cleanliness.
6
+
7
+ 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).
8
+
9
+ More attention is now paid to Syslogging behavior.
10
+
11
+ God will delete its own PID file when terminated via a user request.
12
+
13
+ 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.
14
+
15
+ A watch can now be removed entirely at runtime using `god remove <watch name>`.
16
+
17
+ A new condition DiskUsage allows you to check the available disk space on a given volume.
18
+
19
+ Updated documentation is now available on the website:
20
+
21
+ http://god.rubyforge.org/
22
+
23
+
24
+ WHAT IS GOD?
25
+
26
+ God is an easy to configure, easy to extend monitoring framework written in Ruby.
27
+
28
+ 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.
29
+
30
+
31
+ DISCLAIMER
32
+
33
+ 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.
34
+
35
+
36
+ INSTALL
37
+
38
+ sudo gem install god
39
+
40
+
41
+ FEATURES
42
+
43
+ * Config file is written in Ruby
44
+ * Easily write your own custom conditions in Ruby
45
+ * Supports both poll and event based conditions
46
+ * Different poll conditions can have different intervals
47
+ * Easily control non-daemonized processes
48
+
49
+
50
+ EXAMPLE
51
+
52
+ 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:
53
+
54
+ # run with: god -c /path/to/gravatar.god
55
+ #
56
+ # This is the actual config file used to keep the mongrels of
57
+ # gravatar.com running.
58
+
59
+ RAILS_ROOT = "/Users/tom/dev/gravatar2"
60
+
61
+ %w{8200 8201 8202}.each do |port|
62
+ God.watch do |w|
63
+ w.name = "gravatar2-mongrel-#{port}"
64
+ w.interval = 30.seconds # default
65
+ w.start = "mongrel_rails start -c #{RAILS_ROOT} -p #{port} \
66
+ -P #{RAILS_ROOT}/log/mongrel.#{port}.pid -d"
67
+ w.stop = "mongrel_rails stop -P #{RAILS_ROOT}/log/mongrel.#{port}.pid"
68
+ w.restart = "mongrel_rails restart -P #{RAILS_ROOT}/log/mongrel.#{port}.pid"
69
+ w.start_grace = 10.seconds
70
+ w.restart_grace = 10.seconds
71
+ w.pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid")
72
+
73
+ w.behavior(:clean_pid_file)
74
+
75
+ w.start_if do |start|
76
+ start.condition(:process_running) do |c|
77
+ c.interval = 5.seconds
78
+ c.running = false
79
+ end
80
+ end
81
+
82
+ w.restart_if do |restart|
83
+ restart.condition(:memory_usage) do |c|
84
+ c.above = 150.megabytes
85
+ c.times = [3, 5] # 3 out of 5 intervals
86
+ end
87
+
88
+ restart.condition(:cpu_usage) do |c|
89
+ c.above = 50.percent
90
+ c.times = 5
91
+ end
92
+ end
93
+
94
+ # lifecycle
95
+ w.lifecycle do |on|
96
+ on.condition(:flapping) do |c|
97
+ c.to_state = [:start, :restart]
98
+ c.times = 5
99
+ c.within = 5.minute
100
+ c.transition = :unmonitored
101
+ c.retry_in = 10.minutes
102
+ c.retry_times = 5
103
+ c.retry_within = 2.hours
104
+ end
105
+ end
106
+ end
107
+ end
108
+
109
+
110
+ DOCS
111
+
112
+ Detailed documentation is available at http://god.rubyforge.org/
113
+
114
+
115
+ CHANGES
116
+
117
+ == 0.6.0 / 2007-12-4
118
+
119
+ * Minor Enhancement
120
+ * Move Syslog calls into God::Logger and clean up all calling code
121
+ * Remove god's pid file on user requested termination
122
+ * Better handling and cleanup of DRb server's unix domain socket
123
+ * Allow shorthand for requesting a god log
124
+ * Add `god check` to make it easier to diagnose event problems
125
+ * Refactor god binary into class/method structure
126
+ * Implement `god remove` to remove a Task altogether
127
+ * New Conditions
128
+ * DiskUsage < PollCondition - trigger if disk usage is above limit on mount [Rudy Desjardins]
129
+
130
+
131
+
132
+ AUTHORS
133
+
134
+ Tom Preston-Werner
135
+ Kevin Clark
data/History.txt ADDED
@@ -0,0 +1,345 @@
1
+ == 0.7.22 / 2009-10-29
2
+ * Minor Enhancements
3
+ * Save ARGV so we can get access to it later if we want [github.com/eric]
4
+
5
+ == 0.7.21 / 2009-10-29
6
+ * Minor Enhancements
7
+ * Cache some frequent lookups to reduce object creation [github.com/eric]
8
+ * Try to make SimpleLogger less leaky [github.com/eric]
9
+
10
+ == 0.7.20 / 2009-09-24
11
+ * Minor Enhancements
12
+ * Rewrite `god status` command to be not as horrible. Add ability to get
13
+ status for individual tasks.
14
+
15
+ == 0.7.19 / 2009-09-21
16
+ * Minor Enhancements
17
+ * Teach `god status` to take a task name as a param and return
18
+ an exit code of 0 if all watches are up or a non-zero exit code
19
+ (equal to the number of non-up watches) if they are not.
20
+
21
+ == 0.7.18 / 2009-09-09
22
+ * Minor Enhancements
23
+ * Better handling of unexpected exceptions in conditions
24
+ * Added support for running processes in a directory other than '/' [github.com/samhendley]
25
+ * Bug Fixes
26
+ * Generate an actual unique identifier for email contact [github.com/underley]
27
+
28
+ == 0.7.17 / 2009-08-25
29
+ * Bug Fixes
30
+ * Fix the glob and directory config loading for -c option
31
+
32
+ == 0.7.16 / 2009-08-24
33
+ * Minor Enhancements
34
+ * Better logging for disk_usage condition [github.com/lettherebecode]
35
+ * Bug Fixes
36
+ * Only sleep if driver delay is > 0 [github.com/ps2]
37
+ * Rescue Timeout::Error exception due to smtp server timing out [github.com/ps2]
38
+ * Disk usage condition should use `df -P` to prevent line splitting [github.com/mseppae]
39
+ * Always require YAML so binary works on dumb systems
40
+
41
+ == 0.7.15 / 2009-08-19
42
+ * Minor Enhancements
43
+ * Support SSL Campfire connections [github.com/eric]
44
+ * Allow wildcards in -c configuration file option
45
+
46
+ == 0.7.14 / 2009-08-10
47
+ * Minor Enhancements
48
+ * Only store log lines when a client wishes to see them
49
+ * Add an lsb-compliant init script into god/init [Woody Peterson]
50
+ * Never require stop command; use default killer if none is specified
51
+ * Bug Fixes
52
+ * Fix redefinition error for time.h and allow it to compile on Ubuntu Edgy [github.com/tbuser]
53
+ * Fix a memory leak in jabber by adding a call to jabber_client.close [github.com/woahdae]
54
+ * Make jabber code manage one connection to make it faster, use less memory,
55
+ and not leak [github.com/woahdae]
56
+
57
+ == 0.7.13 / 2009-05-04
58
+ * Bug Fixes
59
+ * Auto daemonized processes are now stopped/unmonitored correctly [github.com/jcapote]
60
+
61
+ == 0.7.12 / 2008-12-10
62
+ * Bug Fixes
63
+ * Fix capistrano deployability [github.com/eric]
64
+ * Fix event handling [brianw]
65
+
66
+ == 0.7.11 / 2008-11-14
67
+ * Bug Fixes
68
+ * Make notifications work inside lifecycle blocks
69
+
70
+ == 0.7.10 / 2008-11-13
71
+ * Major Enhancements
72
+ * Enable sending of arbitrary signals to a task or group via `god signal`
73
+ * Bug Fixes
74
+ * setup logging *after* loading a given config file when daemonized.
75
+ enables logging to the 'God.log_file' specified in a config file. [github.com/jnewland]
76
+ * New Conditions
77
+ * FileMtime < PollCondition - trigger on file mtime durations [github.com/jwilkins]
78
+ * New Contacts
79
+ * Twitter - allow messages to twitter [github.com/jwilkins]
80
+ * Campfire - send messages to 37signals' Campfire [github.com/hellvinz]
81
+ * Minor Enhancements
82
+ * Add watch log_cmd that can be reopened with STDOUT instead of a log file [github.com/jberkel]
83
+ * Added webhook output support [Martyn Loughran]
84
+
85
+ == 0.7.9 / 2008-08-06
86
+ * Major Enhancements
87
+ * Use a psuedo-priority queue for more efficient driver loop [Darrell Kresge]
88
+ * Bug Fixes
89
+ * Fix file_writable? when using chroot [github.com/eric]
90
+
91
+ == 0.7.8 / 2008-07-09
92
+ * Bug Fixes
93
+ * Catch all Exceptions from HttpResponseCode condition [github.com/rliebling]
94
+ * Don't error out if the process went away in SlashProcPoller [Kevin Clark]
95
+ * Correction of Task#handle_poll to prevent crash under event registration failure conditions. [github.com/raggi]
96
+ * Cleaned up logging of failed e-mail sends. [github.com/raggi]
97
+ * Listen on 127.0.0.1 when using God as a client. [github.com/halorgium]
98
+ * New Behaviors
99
+ * clean_unix_socket [github.com/gma]
100
+ * New Contacts
101
+ * jabber [github.com/jwulff]
102
+ * email via sendmail [github.com/monde]
103
+ * Minor Enhancements
104
+ * chroot support [github.com/eric]
105
+ * Added God.log_file for the main god log, overridden by command line option. [github.com/raggi]
106
+ * Print groups from `god status` command if present [github.com/pdlug]
107
+ * Allow headers to be specified for http_response_code condition [github.com/pdlug]
108
+
109
+ == 0.7.7 / 2008-06-17
110
+ * Bug Fixes
111
+ * Fix detection of proc file system [raggi]
112
+
113
+ == 0.7.6 / 2008-05-13
114
+ * Major Enhancements
115
+ * Implement System::Process methods for Linux based on /proc [Kevin Clark]
116
+ * Minor Enhancements
117
+ * Allowing directories to be loaded at start [Bert Goethals]
118
+ * Bug Fixes
119
+ * Don't leak events on error in the kqueue handler [Kevin Clark]
120
+
121
+ == 0.7.5 / 2008-02-21
122
+ * Bug Fixes
123
+ * Remove Ruby's Logger and replace with custom SimpleLogger to stop threaded leak
124
+
125
+ == 0.7.4 / 2008-02-18
126
+ * Bug Fixes
127
+ * Introduce local scope to prevent faulty optimization that causes memory to leak
128
+
129
+ == 0.7.3 / 2008-02-14
130
+ * Minor Enhancements
131
+ * Add --bleakhouse to make running diagnostics easier
132
+ * Bug Fixes
133
+ * Use ::Process.kill(0, ...) instead of `kill -0` [queso]
134
+ * Fix pid_file behavior in process-centric conditions so they work with tasks [matias]
135
+ * Redirect output of daemonized god to log file or /dev/null earlier [_eric]
136
+
137
+ == 0.7.2 / 2008-02-04
138
+ * Bug Fixes
139
+ * Start event system for CLI commands
140
+ * Up internal history to 100 lines per watch
141
+
142
+ == 0.7.1 / 2008-02-04
143
+ * Minor Enhancements
144
+ * Add --no-events option to completely disable events system
145
+
146
+ == 0.7.0 / 2008-02-01
147
+ * Minor Enhancements
148
+ * Better default pid_file_directory behavior
149
+ * Add --attach <pid> to specify that god should quit if <pid> exits
150
+ * Bug Fixes
151
+ * Handle ECONNRESET in HttpResponseCode
152
+
153
+ == 0.6.12 / 2008-01-31
154
+ * Minor Enhancements
155
+ * Allow log file output for non-daemonized god
156
+ * Switch to SIGTERM from SIGHUP for default lambda killer
157
+
158
+ == 0.6.11 / 2008-01-31
159
+ * Major Enhancements
160
+ * HUGE refactor of timer system to simplify scheduling
161
+ * Minor Enhancements
162
+ * Check for a truly working event system and disallow event conditions if none is present
163
+
164
+ == 0.6.10 / 2008-01-24
165
+ * Bug Fixes
166
+ * Fix ensure_stop nil pid no local variable bug
167
+
168
+ == 0.6.9 / 2008-01-23
169
+ * Bug Fixes
170
+ * Fix Timer condition dedup behavior
171
+
172
+ == 0.6.8 / 2008-01-23
173
+ * Minor Enhancements
174
+ * Warn if a command returns a non-zero exit code
175
+ * Ensure that stop command actually stops process
176
+
177
+ == 0.6.7 / 2008-01-22
178
+ * Minor Enhancements
179
+ * Add --no-syslog option to disable Syslog
180
+ * Allow contact redeclaration (dups are ignored)
181
+
182
+ == 0.6.6 / 2008-01-07
183
+ * Bug Fixes
184
+ * Redo Timer mutexing to reduce synchronization needs
185
+
186
+ == 0.6.5 / 2008-01-04
187
+ * Bug Fixes
188
+ * Fix Timer descheduling deadlock issue
189
+ * Change HttpResponseCode to use GET instead of HEAD
190
+
191
+ == 0.6.4 / 2008-12-31
192
+ * Bug Fixes
193
+ * Refactor Hub to clarify mutexing
194
+ * Eliminate potential iteration problem in Timer
195
+ * Add caching PID accessor to process to solve event deregistration failure
196
+
197
+ == 0.6.3 / 2007-12-18
198
+ * Minor Enhancements
199
+ * Output ProcessExits registration/deregistration info
200
+
201
+ == 0.6.2 / 2007-12-17
202
+ * Minor Enhancements
203
+ * Output registered PID for ProcessExits
204
+ * Bug Fixes
205
+ * Fix `god remove <group>` not working for unmonitored watches
206
+
207
+ == 0.6.1 / 2007-12-14
208
+
209
+ * Minor Enhancement
210
+ * Log when state change is complete
211
+
212
+ == 0.6.0 / 2007-12-4
213
+
214
+ * Minor Enhancement
215
+ * Move Syslog calls into God::Logger and clean up all calling code
216
+ * Remove god's pid file on user requested termination
217
+ * Better handling and cleanup of DRb server's unix domain socket
218
+ * Allow shorthand for requesting a god log
219
+ * Add `god check` to make it easier to diagnose event problems
220
+ * Refactor god binary into class/method structure
221
+ * Implement `god remove` to remove a Task altogether
222
+ * New Conditions
223
+ * DiskUsage < PollCondition - trigger if disk usage is above limit on mount [Rudy Desjardins]
224
+
225
+ == 0.5.2 / 2007-10-10
226
+
227
+ * Minor Enhancement
228
+ * Allow extra args to pass through to config file
229
+
230
+ == 0.5.1 / 2007-10-08
231
+
232
+ * Bug Fixes
233
+ * Rescue connection refused in http response code condition
234
+
235
+ == 0.5.0 / 2007-10-05
236
+
237
+ * Major Enhancements
238
+ * Implement lifecycle scoped metric to allow for cross-state conditions
239
+ * Add TriggerCondition for conditions that need info about state changes
240
+ * Implement notification system
241
+ * Add Tasks (a generalization of Watches) to do non-process related tasks
242
+ * Add example init.d file in GOD_INSTALL_DIR/init/god [scott becker]
243
+ * Add human readable info to conditions (and make low level log lines debug)
244
+ * Switch DRb to use a unix domain socket for security reasons
245
+ * Minor Enchancements
246
+ * Allow EventConditions to do transition overloading
247
+ * Report errors during god startup instead of failing silently
248
+ * Make transition block optional (default to Always condition returning true)
249
+ * Better usage info for `god --help`
250
+ * Explain what's going on when attempting to rebind to an in-use port
251
+ * Add -b option to god binary to auto-bind to an unused port
252
+ * Add `god quit` to stop god without stopping any tasks
253
+ * Make self-daemonized Watch commands synchronous (as they should be)
254
+ * Allow self-daemonized Watches to specify a log (could be useful)
255
+ * Check for existence of config file if specified
256
+ * Robustify `god load` and report errors back to the command issuer
257
+ * Warn when `god load` tries to set global options
258
+ * Add Configurable.clear method and make built-in conditions clear on entry
259
+ * New Conditions
260
+ * Flapping < TriggerCondition - trigger on state change
261
+ * HttpResponseCode < PollCondition - trigger on http response code or timeout (thx scott becker)
262
+ * New Contacts
263
+ * Email < Contact - notify via email (smtp)
264
+ * Bug Fixes
265
+ * Fix abort not aborting problem
266
+ * Fix -p option not working for god binary
267
+ * Fix God.init not accepting block (thx _eric)
268
+ * Fix SIGHUP ignore (thx _eric)
269
+ * Fix error reporting on `god --help` (don't error report a normal SystemExit)
270
+
271
+ == 0.4.3 / 2007-09-10
272
+ * Bug Fixes
273
+ * fix Process#alive? to not raise on no such file (affects `god terminate`)
274
+
275
+ == 0.4.2 / 2007-09-10
276
+ * Bug Fixes
277
+ * fix netlink buffer issue that prevented events on Linux from working consistently [dkresge]
278
+
279
+ == 0.4.1 / 2007-09-10
280
+ * Bug Fixes
281
+ * require 'stringio' for ruby 1.8.5
282
+
283
+ == 0.4.0 / 2007-09-10
284
+
285
+ * Major Enhancements
286
+ * Add the ability for conditions to override transition state (for exceptional cases)
287
+ * Implement dynamic load of config files while god is running (god load <filename>)
288
+ * Add ability to save auto-daemonized process output to a log file
289
+ * Add robust default stop lambda command for auto-daemonized processes (inspired by _eric)
290
+ * Add status command for god binary (shows status of each watch)
291
+ * Create proper logger with timestamps
292
+ * Add log command to god binary to get real time logs for a specific watch from a running god instance
293
+ * Add terminate command for god binary (stop god and all watches)
294
+ * Minor Enhancements
295
+ * Enforce validity of Watches
296
+ * Enforce that God.init is not called after a Watch
297
+ * Move pid_file_directory creation and validation to God.start
298
+ * Remove check for at least one Watch during startup (now that dynamic loading exists)
299
+ * New Conditions
300
+ * Tries < PollCondition - triggers after the specified number of tries
301
+ * Add :notify_when_flapping behavior to check for oscillation [kevinclark]
302
+ * Add :degrading_lambda condition. [kevinclark]
303
+ It uses a decaying interval (1/2 rate) for 3 cycles before failing.
304
+ * Bug Fixes
305
+ * Use exit!(0) instead of exit! in god binary to exit with code 0 (instead of default -1)
306
+ * Command line group control fixed
307
+ * Fix cross-thread return problem
308
+
309
+ == 0.3.0 / 2007-08-17
310
+
311
+ * Fix netlink header problem on Ubuntu Edgy [Dan Sully]
312
+ * Add uid/gid setting for processes [kevinclark]
313
+ * Add autostart flag for watches so they don't necessarily startup with god [kevinclark]
314
+ * Change command line call options for god binary to accommodate watch start/stop functionality
315
+ * Add individual start/stop/restart grace periods for finer grained control
316
+ * Change default DRb port to 17165 ('god'.to_i(32))
317
+ * Implement command line control to start/restart/stop/monitor/unmonitor watches/groups by name
318
+ * Watches can now belong to a group that can be controlled as a whole
319
+ * Allow god to be installed (sans events) on systems that don't support events
320
+ * Daemonize and handle PID files for non-daemonizing scripts [kevinclark]
321
+ * Fix simple mode lifecycle gap
322
+ * Remove necessity to specify pid_file for conditions
323
+ * Change config file to use God.init and God.watch directly instead of God.meddle block
324
+ * Move god binary command logic to main library
325
+ * Enhance god binary with better reporting
326
+ * Fix synchronization bug in Timer (reported by Srini Panguluri)
327
+ * Add Lambda condition for easy custom conditions [Mike Mintz]
328
+ * Add sugar for numerics (seconds, minutes, kilobytes, megabytes, percent, etc)
329
+ * Add optional PID and log file generation to god binary for daemon mode
330
+ * Add God.load to do glob enabled loading
331
+ * Add -V option to god binary for detailed version/build info
332
+
333
+ == 0.2.0 / 2007-07-18
334
+
335
+ * Rewrote innards to use a state and event based lifecycle
336
+ * Basic support for events via kqueue (bsd/darwin) and netlink/pec (linux) [kevinclark]
337
+ * Added advanced syntax (simple syntax calls advanced api underneath)
338
+ * Condition returns have changed meaning. With simple syntax, a true return activates block
339
+ * Updated http://god.rubyforge.org with updated simple config and new advanced config
340
+
341
+ == 0.1.0 / 2007-07-07
342
+
343
+ * 1 major enhancement
344
+ * Birthday!
345
+
data/README.txt ADDED
@@ -0,0 +1,59 @@
1
+ god
2
+ by Tom Preston-Werner
3
+ Kevin Clark (kqueue/netlink support)
4
+
5
+ http://god.rubyforge.org
6
+
7
+ == DESCRIPTION:
8
+
9
+ God is an easy to configure, easy to extend monitoring framework written
10
+ in Ruby.
11
+
12
+ Keeping your server processes and tasks running should be a simple part of
13
+ your deployment process. God aims to be the simplest, most powerful
14
+ monitoring application available.
15
+
16
+ == DOCUMENTATION:
17
+
18
+ See online documentation at http://god.rubyforge.org
19
+
20
+ == COMMUNITY:
21
+
22
+ Sign up for the god mailing list at http://groups.google.com/group/god-rb
23
+
24
+ == INSTALL:
25
+
26
+ $ sudo gem install god
27
+
28
+ == CONTRIBUTE:
29
+
30
+ Latest code is available at http://github.com/mojombo/god
31
+
32
+ The 'master' branch can be cloned with:
33
+
34
+ $ git clone git://github.com/mojombo/god.git
35
+
36
+ == LICENSE:
37
+
38
+ (The MIT License)
39
+
40
+ Copyright (c) 2007 Tom Preston-Werner
41
+
42
+ Permission is hereby granted, free of charge, to any person obtaining
43
+ a copy of this software and associated documentation files (the
44
+ 'Software'), to deal in the Software without restriction, including
45
+ without limitation the rights to use, copy, modify, merge, publish,
46
+ distribute, sublicense, and/or sell copies of the Software, and to
47
+ permit persons to whom the Software is furnished to do so, subject to
48
+ the following conditions:
49
+
50
+ The above copyright notice and this permission notice shall be
51
+ included in all copies or substantial portions of the Software.
52
+
53
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
54
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
56
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
57
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
58
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
59
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,69 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "olgen-god"
8
+ # gem.rubyforge_project = "god"
9
+ gem.summary = 'Like god, but olgen!'
10
+ gem.description = "Fork of God - God is an easy to configure, easy to extend monitoring framework written in Ruby."
11
+ gem.email = "eugen.martin@madvertise.de"
12
+ gem.homepage = "http://github.com/olgen/god"
13
+ gem.authors = ["Tom Preston-Werner, Eugen Martin"]
14
+ gem.require_paths = ["lib", "ext"]
15
+ gem.files.include("ext")
16
+ gem.extensions << 'ext/god/extconf.rb'
17
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18
+ end
19
+ Jeweler::GemcutterTasks.new
20
+
21
+ rescue LoadError
22
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
23
+ end
24
+
25
+ # require 'rake/testtask'
26
+ # Rake::TestTask.new(:test) do |test|
27
+ # test.libs << 'lib' << 'test'
28
+ # test.pattern = 'test/**/test_*.rb'
29
+ # test.verbose = true
30
+ # end
31
+
32
+ # task :default => :test
33
+
34
+ # desc "Open an irb session preloaded with this library"
35
+ # task :console do
36
+ # sh "irb -rubygems -r ./lib/god.rb"
37
+ # end
38
+ #
39
+ # desc "Upload site to Rubyforge"
40
+ # task :site do
41
+ # sh "scp -r site/* mojombo@god.rubyforge.org:/var/www/gforge-projects/god"
42
+ # end
43
+ #
44
+ # desc "Upload site to Rubyforge"
45
+ # task :site_edge do
46
+ # sh "scp -r site/* mojombo@god.rubyforge.org:/var/www/gforge-projects/god/edge"
47
+ # end
48
+ #
49
+ # desc "Run rcov"
50
+ # task :coverage do
51
+ # `rm -fr coverage`
52
+ # `rcov test/test_*.rb`
53
+ # `open coverage/index.html`
54
+ # end
55
+ #
56
+ # require 'rake/rdoctask'
57
+ # Rake::RDocTask.new do |rdoc|
58
+ # if File.exist?('VERSION.yml')
59
+ # config = YAML.load(File.read('VERSION.yml'))
60
+ # version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
61
+ # else
62
+ # version = ""
63
+ # end
64
+ #
65
+ # rdoc.rdoc_dir = 'rdoc'
66
+ # rdoc.title = "god #{version}"
67
+ # rdoc.rdoc_files.include('README*')
68
+ # rdoc.rdoc_files.include('lib/**/*.rb')
69
+ # end
data/VERSION.yml ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ :patch: 0
3
+ :major: 0
4
+ :minor: 8