resurrected_god 0.14.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/History.md +559 -0
  3. data/README.md +9 -4
  4. data/bin/god +26 -28
  5. data/ext/god/extconf.rb +9 -9
  6. data/lib/god/behavior.rb +3 -5
  7. data/lib/god/behaviors/clean_pid_file.rb +4 -6
  8. data/lib/god/behaviors/clean_unix_socket.rb +4 -6
  9. data/lib/god/behaviors/notify_when_flapping.rb +13 -15
  10. data/lib/god/cli/command.rb +109 -89
  11. data/lib/god/cli/run.rb +51 -75
  12. data/lib/god/cli/version.rb +2 -4
  13. data/lib/god/condition.rb +12 -14
  14. data/lib/god/conditions/always.rb +3 -2
  15. data/lib/god/conditions/complex.rb +23 -24
  16. data/lib/god/conditions/cpu_usage.rb +12 -16
  17. data/lib/god/conditions/degrading_lambda.rb +15 -19
  18. data/lib/god/conditions/disk_usage.rb +7 -8
  19. data/lib/god/conditions/file_mtime.rb +3 -7
  20. data/lib/god/conditions/file_touched.rb +4 -5
  21. data/lib/god/conditions/flapping.rb +57 -62
  22. data/lib/god/conditions/http_response_code.rb +27 -32
  23. data/lib/god/conditions/lambda.rb +3 -5
  24. data/lib/god/conditions/memory_usage.rb +12 -16
  25. data/lib/god/conditions/process_exits.rb +12 -12
  26. data/lib/god/conditions/process_running.rb +8 -10
  27. data/lib/god/conditions/socket_responding.rb +23 -28
  28. data/lib/god/conditions/tries.rb +12 -14
  29. data/lib/god/configurable.rb +7 -10
  30. data/lib/god/contact.rb +41 -52
  31. data/lib/god/contacts/airbrake.rb +10 -12
  32. data/lib/god/contacts/campfire.rb +18 -20
  33. data/lib/god/contacts/email.rb +27 -28
  34. data/lib/god/contacts/prowl.rb +16 -17
  35. data/lib/god/contacts/scout.rb +2 -5
  36. data/lib/god/contacts/sensu.rb +15 -11
  37. data/lib/god/contacts/slack.rb +23 -33
  38. data/lib/god/contacts/statsd.rb +8 -8
  39. data/lib/god/contacts/twitter.rb +2 -2
  40. data/lib/god/contacts/webhook.rb +21 -24
  41. data/lib/god/driver.rb +12 -18
  42. data/lib/god/errors.rb +0 -2
  43. data/lib/god/event_handler.rb +40 -49
  44. data/lib/god/event_handlers/dummy_handler.rb +1 -1
  45. data/lib/god/event_handlers/kqueue_handler.rb +2 -2
  46. data/lib/god/event_handlers/netlink_handler.rb +1 -1
  47. data/lib/god/logger.rb +5 -13
  48. data/lib/god/metric.rb +13 -15
  49. data/lib/god/process.rb +93 -98
  50. data/lib/god/simple_logger.rb +13 -15
  51. data/lib/god/socket.rb +21 -23
  52. data/lib/god/sugar.rb +8 -8
  53. data/lib/god/sys_logger.rb +6 -8
  54. data/lib/god/system/portable_poller.rb +1 -9
  55. data/lib/god/system/process.rb +4 -6
  56. data/lib/god/system/slash_proc_poller.rb +17 -19
  57. data/lib/god/task.rb +110 -136
  58. data/lib/god/timeline.rb +2 -4
  59. data/lib/god/trigger.rb +7 -11
  60. data/lib/god/version.rb +1 -1
  61. data/lib/god/watch.rb +51 -57
  62. data/lib/god.rb +122 -148
  63. metadata +17 -370
  64. data/Announce.txt +0 -135
  65. data/Gemfile +0 -5
  66. data/Rakefile +0 -129
  67. data/doc/god.asciidoc +0 -1592
  68. data/doc/intro.asciidoc +0 -20
  69. data/ext/god/.gitignore +0 -5
  70. data/lib/god/compat19.rb +0 -33
  71. data/lib/god/contacts/hipchat.rb +0 -117
  72. data/lib/god/contacts/jabber.rb +0 -75
  73. data/test/configs/child_events/child_events.god +0 -44
  74. data/test/configs/child_events/simple_server.rb +0 -3
  75. data/test/configs/child_polls/child_polls.god +0 -37
  76. data/test/configs/child_polls/simple_server.rb +0 -12
  77. data/test/configs/complex/complex.god +0 -59
  78. data/test/configs/complex/simple_server.rb +0 -3
  79. data/test/configs/contact/contact.god +0 -118
  80. data/test/configs/contact/simple_server.rb +0 -3
  81. data/test/configs/daemon_events/daemon_events.god +0 -37
  82. data/test/configs/daemon_events/simple_server.rb +0 -8
  83. data/test/configs/daemon_events/simple_server_stop.rb +0 -11
  84. data/test/configs/daemon_polls/daemon_polls.god +0 -17
  85. data/test/configs/daemon_polls/simple_server.rb +0 -6
  86. data/test/configs/degrading_lambda/degrading_lambda.god +0 -31
  87. data/test/configs/degrading_lambda/tcp_server.rb +0 -15
  88. data/test/configs/keepalive/keepalive.god +0 -9
  89. data/test/configs/keepalive/keepalive.rb +0 -12
  90. data/test/configs/lifecycle/lifecycle.god +0 -25
  91. data/test/configs/matias/matias.god +0 -50
  92. data/test/configs/real.rb +0 -59
  93. data/test/configs/running_load/running_load.god +0 -16
  94. data/test/configs/stop_options/simple_server.rb +0 -12
  95. data/test/configs/stop_options/stop_options.god +0 -39
  96. data/test/configs/stress/simple_server.rb +0 -3
  97. data/test/configs/stress/stress.god +0 -15
  98. data/test/configs/task/logs/.placeholder +0 -0
  99. data/test/configs/task/task.god +0 -26
  100. data/test/configs/test.rb +0 -61
  101. data/test/configs/usr1_trapper.rb +0 -10
  102. data/test/helper.rb +0 -172
  103. data/test/suite.rb +0 -6
  104. data/test/test_airbrake.rb +0 -14
  105. data/test/test_behavior.rb +0 -18
  106. data/test/test_campfire.rb +0 -22
  107. data/test/test_condition.rb +0 -52
  108. data/test/test_conditions_disk_usage.rb +0 -50
  109. data/test/test_conditions_http_response_code.rb +0 -109
  110. data/test/test_conditions_process_running.rb +0 -40
  111. data/test/test_conditions_socket_responding.rb +0 -176
  112. data/test/test_conditions_tries.rb +0 -67
  113. data/test/test_contact.rb +0 -109
  114. data/test/test_driver.rb +0 -26
  115. data/test/test_email.rb +0 -34
  116. data/test/test_event_handler.rb +0 -82
  117. data/test/test_god.rb +0 -710
  118. data/test/test_god_system.rb +0 -201
  119. data/test/test_handlers_kqueue_handler.rb +0 -16
  120. data/test/test_hipchat.rb +0 -23
  121. data/test/test_jabber.rb +0 -29
  122. data/test/test_logger.rb +0 -55
  123. data/test/test_metric.rb +0 -74
  124. data/test/test_process.rb +0 -263
  125. data/test/test_prowl.rb +0 -15
  126. data/test/test_registry.rb +0 -15
  127. data/test/test_sensu.rb +0 -11
  128. data/test/test_slack.rb +0 -57
  129. data/test/test_socket.rb +0 -34
  130. data/test/test_statsd.rb +0 -22
  131. data/test/test_sugar.rb +0 -42
  132. data/test/test_system_portable_poller.rb +0 -17
  133. data/test/test_system_process.rb +0 -30
  134. data/test/test_task.rb +0 -246
  135. data/test/test_timeline.rb +0 -37
  136. data/test/test_trigger.rb +0 -63
  137. data/test/test_watch.rb +0 -286
  138. data/test/test_webhook.rb +0 -22
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resurrected_god
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -11,258 +11,8 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-03-06 00:00:00.000000000 Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: json
18
- requirement: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - "~>"
21
- - !ruby/object:Gem::Version
22
- version: '1.6'
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '1.6'
30
- - !ruby/object:Gem::Dependency
31
- name: rake
32
- requirement: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: '0'
37
- type: :development
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '0'
44
- - !ruby/object:Gem::Dependency
45
- name: minitest
46
- requirement: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: '0'
51
- type: :development
52
- prerelease: false
53
- version_requirements: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: '0'
58
- - !ruby/object:Gem::Dependency
59
- name: rdoc
60
- requirement: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - "~>"
63
- - !ruby/object:Gem::Version
64
- version: '3.10'
65
- type: :development
66
- prerelease: false
67
- version_requirements: !ruby/object:Gem::Requirement
68
- requirements:
69
- - - "~>"
70
- - !ruby/object:Gem::Version
71
- version: '3.10'
72
- - !ruby/object:Gem::Dependency
73
- name: twitter
74
- requirement: !ruby/object:Gem::Requirement
75
- requirements:
76
- - - "~>"
77
- - !ruby/object:Gem::Version
78
- version: '5.0'
79
- type: :development
80
- prerelease: false
81
- version_requirements: !ruby/object:Gem::Requirement
82
- requirements:
83
- - - "~>"
84
- - !ruby/object:Gem::Version
85
- version: '5.0'
86
- - !ruby/object:Gem::Dependency
87
- name: prowly
88
- requirement: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - "~>"
91
- - !ruby/object:Gem::Version
92
- version: '0.3'
93
- type: :development
94
- prerelease: false
95
- version_requirements: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '0.3'
100
- - !ruby/object:Gem::Dependency
101
- name: xmpp4r
102
- requirement: !ruby/object:Gem::Requirement
103
- requirements:
104
- - - "~>"
105
- - !ruby/object:Gem::Version
106
- version: '0.5'
107
- type: :development
108
- prerelease: false
109
- version_requirements: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: '0.5'
114
- - !ruby/object:Gem::Dependency
115
- name: dike
116
- requirement: !ruby/object:Gem::Requirement
117
- requirements:
118
- - - "~>"
119
- - !ruby/object:Gem::Version
120
- version: 0.0.3
121
- type: :development
122
- prerelease: false
123
- version_requirements: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "~>"
126
- - !ruby/object:Gem::Version
127
- version: 0.0.3
128
- - !ruby/object:Gem::Dependency
129
- name: daemons
130
- requirement: !ruby/object:Gem::Requirement
131
- requirements:
132
- - - "~>"
133
- - !ruby/object:Gem::Version
134
- version: '1.1'
135
- type: :development
136
- prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- requirements:
139
- - - "~>"
140
- - !ruby/object:Gem::Version
141
- version: '1.1'
142
- - !ruby/object:Gem::Dependency
143
- name: mocha
144
- requirement: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - "~>"
147
- - !ruby/object:Gem::Version
148
- version: '0.10'
149
- type: :development
150
- prerelease: false
151
- version_requirements: !ruby/object:Gem::Requirement
152
- requirements:
153
- - - "~>"
154
- - !ruby/object:Gem::Version
155
- version: '0.10'
156
- - !ruby/object:Gem::Dependency
157
- name: gollum
158
- requirement: !ruby/object:Gem::Requirement
159
- requirements:
160
- - - "~>"
161
- - !ruby/object:Gem::Version
162
- version: 1.3.1
163
- type: :development
164
- prerelease: false
165
- version_requirements: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - "~>"
168
- - !ruby/object:Gem::Version
169
- version: 1.3.1
170
- - !ruby/object:Gem::Dependency
171
- name: mustache
172
- requirement: !ruby/object:Gem::Requirement
173
- requirements:
174
- - - "~>"
175
- - !ruby/object:Gem::Version
176
- version: 0.99.0
177
- - - "<"
178
- - !ruby/object:Gem::Version
179
- version: 0.99.7
180
- type: :development
181
- prerelease: false
182
- version_requirements: !ruby/object:Gem::Requirement
183
- requirements:
184
- - - "~>"
185
- - !ruby/object:Gem::Version
186
- version: 0.99.0
187
- - - "<"
188
- - !ruby/object:Gem::Version
189
- version: 0.99.7
190
- - !ruby/object:Gem::Dependency
191
- name: airbrake
192
- requirement: !ruby/object:Gem::Requirement
193
- requirements:
194
- - - "~>"
195
- - !ruby/object:Gem::Version
196
- version: 3.1.7
197
- type: :development
198
- prerelease: false
199
- version_requirements: !ruby/object:Gem::Requirement
200
- requirements:
201
- - - "~>"
202
- - !ruby/object:Gem::Version
203
- version: 3.1.7
204
- - !ruby/object:Gem::Dependency
205
- name: nokogiri
206
- requirement: !ruby/object:Gem::Requirement
207
- requirements:
208
- - - "~>"
209
- - !ruby/object:Gem::Version
210
- version: 1.5.0
211
- type: :development
212
- prerelease: false
213
- version_requirements: !ruby/object:Gem::Requirement
214
- requirements:
215
- - - "~>"
216
- - !ruby/object:Gem::Version
217
- version: 1.5.0
218
- - !ruby/object:Gem::Dependency
219
- name: activesupport
220
- requirement: !ruby/object:Gem::Requirement
221
- requirements:
222
- - - ">="
223
- - !ruby/object:Gem::Version
224
- version: 2.3.10
225
- - - "<"
226
- - !ruby/object:Gem::Version
227
- version: 4.0.0
228
- type: :development
229
- prerelease: false
230
- version_requirements: !ruby/object:Gem::Requirement
231
- requirements:
232
- - - ">="
233
- - !ruby/object:Gem::Version
234
- version: 2.3.10
235
- - - "<"
236
- - !ruby/object:Gem::Version
237
- version: 4.0.0
238
- - !ruby/object:Gem::Dependency
239
- name: statsd-ruby
240
- requirement: !ruby/object:Gem::Requirement
241
- requirements:
242
- - - ">="
243
- - !ruby/object:Gem::Version
244
- version: '0'
245
- type: :development
246
- prerelease: false
247
- version_requirements: !ruby/object:Gem::Requirement
248
- requirements:
249
- - - ">="
250
- - !ruby/object:Gem::Version
251
- version: '0'
252
- - !ruby/object:Gem::Dependency
253
- name: i18n
254
- requirement: !ruby/object:Gem::Requirement
255
- requirements:
256
- - - "<"
257
- - !ruby/object:Gem::Version
258
- version: 0.7.0
259
- type: :development
260
- prerelease: false
261
- version_requirements: !ruby/object:Gem::Requirement
262
- requirements:
263
- - - "<"
264
- - !ruby/object:Gem::Version
265
- version: 0.7.0
14
+ date: 2022-06-21 00:00:00.000000000 Z
15
+ dependencies: []
266
16
  description: An easy to configure, easy to extend monitoring framework written in
267
17
  Ruby.
268
18
  email:
@@ -275,15 +25,10 @@ extensions:
275
25
  extra_rdoc_files:
276
26
  - README.md
277
27
  files:
278
- - Announce.txt
279
- - Gemfile
28
+ - History.md
280
29
  - LICENSE
281
30
  - README.md
282
- - Rakefile
283
31
  - bin/god
284
- - doc/god.asciidoc
285
- - doc/intro.asciidoc
286
- - ext/god/.gitignore
287
32
  - ext/god/extconf.rb
288
33
  - ext/god/kqueue_handler.c
289
34
  - ext/god/netlink_handler.c
@@ -295,7 +40,6 @@ files:
295
40
  - lib/god/cli/command.rb
296
41
  - lib/god/cli/run.rb
297
42
  - lib/god/cli/version.rb
298
- - lib/god/compat19.rb
299
43
  - lib/god/condition.rb
300
44
  - lib/god/conditions/always.rb
301
45
  - lib/god/conditions/complex.rb
@@ -317,8 +61,6 @@ files:
317
61
  - lib/god/contacts/airbrake.rb
318
62
  - lib/god/contacts/campfire.rb
319
63
  - lib/god/contacts/email.rb
320
- - lib/god/contacts/hipchat.rb
321
- - lib/god/contacts/jabber.rb
322
64
  - lib/god/contacts/prowl.rb
323
65
  - lib/god/contacts/scout.rb
324
66
  - lib/god/contacts/sensu.rb
@@ -348,75 +90,15 @@ files:
348
90
  - lib/god/trigger.rb
349
91
  - lib/god/version.rb
350
92
  - lib/god/watch.rb
351
- - test/configs/child_events/child_events.god
352
- - test/configs/child_events/simple_server.rb
353
- - test/configs/child_polls/child_polls.god
354
- - test/configs/child_polls/simple_server.rb
355
- - test/configs/complex/complex.god
356
- - test/configs/complex/simple_server.rb
357
- - test/configs/contact/contact.god
358
- - test/configs/contact/simple_server.rb
359
- - test/configs/daemon_events/daemon_events.god
360
- - test/configs/daemon_events/simple_server.rb
361
- - test/configs/daemon_events/simple_server_stop.rb
362
- - test/configs/daemon_polls/daemon_polls.god
363
- - test/configs/daemon_polls/simple_server.rb
364
- - test/configs/degrading_lambda/degrading_lambda.god
365
- - test/configs/degrading_lambda/tcp_server.rb
366
- - test/configs/keepalive/keepalive.god
367
- - test/configs/keepalive/keepalive.rb
368
- - test/configs/lifecycle/lifecycle.god
369
- - test/configs/matias/matias.god
370
- - test/configs/real.rb
371
- - test/configs/running_load/running_load.god
372
- - test/configs/stop_options/simple_server.rb
373
- - test/configs/stop_options/stop_options.god
374
- - test/configs/stress/simple_server.rb
375
- - test/configs/stress/stress.god
376
- - test/configs/task/logs/.placeholder
377
- - test/configs/task/task.god
378
- - test/configs/test.rb
379
- - test/configs/usr1_trapper.rb
380
- - test/helper.rb
381
- - test/suite.rb
382
- - test/test_airbrake.rb
383
- - test/test_behavior.rb
384
- - test/test_campfire.rb
385
- - test/test_condition.rb
386
- - test/test_conditions_disk_usage.rb
387
- - test/test_conditions_http_response_code.rb
388
- - test/test_conditions_process_running.rb
389
- - test/test_conditions_socket_responding.rb
390
- - test/test_conditions_tries.rb
391
- - test/test_contact.rb
392
- - test/test_driver.rb
393
- - test/test_email.rb
394
- - test/test_event_handler.rb
395
- - test/test_god.rb
396
- - test/test_god_system.rb
397
- - test/test_handlers_kqueue_handler.rb
398
- - test/test_hipchat.rb
399
- - test/test_jabber.rb
400
- - test/test_logger.rb
401
- - test/test_metric.rb
402
- - test/test_process.rb
403
- - test/test_prowl.rb
404
- - test/test_registry.rb
405
- - test/test_sensu.rb
406
- - test/test_slack.rb
407
- - test/test_socket.rb
408
- - test/test_statsd.rb
409
- - test/test_sugar.rb
410
- - test/test_system_portable_poller.rb
411
- - test/test_system_process.rb
412
- - test/test_task.rb
413
- - test/test_timeline.rb
414
- - test/test_trigger.rb
415
- - test/test_watch.rb
416
- - test/test_webhook.rb
417
- homepage: http://god.rubyforge.org/
418
- licenses: []
419
- metadata: {}
93
+ homepage: https://github.com/mishina2228/resurrected_god
94
+ licenses:
95
+ - MIT
96
+ metadata:
97
+ bug_tracker_uri: https://github.com/mishina2228/resurrected_god/issues
98
+ changelog_uri: https://github.com/mishina2228/resurrected_god/blob/master/History.md
99
+ homepage_uri: https://github.com/mishina2228/resurrected_god
100
+ rubygems_mfa_required: 'true'
101
+ source_code_uri: https://github.com/mishina2228/resurrected_god/tree/v1.0.0
420
102
  post_install_message:
421
103
  rdoc_options:
422
104
  - "--charset=UTF-8"
@@ -427,50 +109,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
427
109
  requirements:
428
110
  - - ">="
429
111
  - !ruby/object:Gem::Version
430
- version: '0'
112
+ version: 2.6.0
431
113
  required_rubygems_version: !ruby/object:Gem::Requirement
432
114
  requirements:
433
115
  - - ">="
434
116
  - !ruby/object:Gem::Version
435
117
  version: '0'
436
118
  requirements: []
437
- rubygems_version: 3.3.3
119
+ rubygems_version: 3.3.7
438
120
  signing_key:
439
- specification_version: 2
121
+ specification_version: 4
440
122
  summary: Process monitoring framework.
441
- test_files:
442
- - test/test_airbrake.rb
443
- - test/test_behavior.rb
444
- - test/test_campfire.rb
445
- - test/test_condition.rb
446
- - test/test_conditions_disk_usage.rb
447
- - test/test_conditions_http_response_code.rb
448
- - test/test_conditions_process_running.rb
449
- - test/test_conditions_socket_responding.rb
450
- - test/test_conditions_tries.rb
451
- - test/test_contact.rb
452
- - test/test_driver.rb
453
- - test/test_email.rb
454
- - test/test_event_handler.rb
455
- - test/test_god.rb
456
- - test/test_god_system.rb
457
- - test/test_handlers_kqueue_handler.rb
458
- - test/test_hipchat.rb
459
- - test/test_jabber.rb
460
- - test/test_logger.rb
461
- - test/test_metric.rb
462
- - test/test_process.rb
463
- - test/test_prowl.rb
464
- - test/test_registry.rb
465
- - test/test_sensu.rb
466
- - test/test_slack.rb
467
- - test/test_socket.rb
468
- - test/test_statsd.rb
469
- - test/test_sugar.rb
470
- - test/test_system_portable_poller.rb
471
- - test/test_system_process.rb
472
- - test/test_task.rb
473
- - test/test_timeline.rb
474
- - test/test_trigger.rb
475
- - test/test_watch.rb
476
- - test/test_webhook.rb
123
+ test_files: []
data/Announce.txt DELETED
@@ -1,135 +0,0 @@
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/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
3
-
4
- gem 'redcarpet', '< 3.0.0'
5
- gem 'sanitize', '2.0.3'
data/Rakefile DELETED
@@ -1,129 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rubygems'
3
- require 'rake'
4
- require 'rdoc/task'
5
- require 'date'
6
-
7
- require_relative 'lib/god/version'
8
-
9
- #############################################################################
10
- #
11
- # Helper functions
12
- #
13
- #############################################################################
14
-
15
- def name
16
- @name ||= Dir['*.gemspec'].first.split('.').first
17
- end
18
-
19
- def version
20
- God::VERSION
21
- end
22
-
23
- def date
24
- Date.today.to_s
25
- end
26
-
27
- def rubyforge_project
28
- name
29
- end
30
-
31
- def gemspec_file
32
- "#{name}.gemspec"
33
- end
34
-
35
- def gem_file
36
- "#{name}-#{version}.gem"
37
- end
38
-
39
- def replace_header(head, header_name)
40
- head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
41
- end
42
-
43
- #############################################################################
44
- #
45
- # Standard tasks
46
- #
47
- #############################################################################
48
-
49
- task :default => :test
50
-
51
- require 'rake/testtask'
52
- Rake::TestTask.new(:test) do |test|
53
- file_list = FileList['test/**/test_*.rb']
54
- file_list = file_list.exclude("test/test_god_system.rb")
55
- test.test_files = file_list
56
- test.libs << 'lib' << 'test'
57
- test.verbose = true
58
- end
59
-
60
- Rake::TestTask.new(:system_test) do |test|
61
- test.libs << 'lib' << 'test'
62
- test.pattern = 'test/**/test_god_system.rb'
63
- test.verbose = true
64
- end
65
-
66
- desc "Generate RCov test coverage and open in your browser"
67
- task :coverage do
68
- require 'rcov'
69
- sh "rm -fr coverage"
70
- sh "rcov test/test_*.rb"
71
- sh "open coverage/index.html"
72
- end
73
-
74
- Rake::RDocTask.new do |rdoc|
75
- rdoc.rdoc_dir = 'rdoc'
76
- rdoc.title = "#{name} #{version}"
77
- rdoc.rdoc_files.include('README*')
78
- rdoc.rdoc_files.include('lib/**/*.rb')
79
- end
80
-
81
- desc "Open an irb session preloaded with this library"
82
- task :console do
83
- sh "irb -rubygems -r ./lib/#{name}.rb"
84
- end
85
-
86
- #############################################################################
87
- #
88
- # Custom tasks (add your own tasks here)
89
- #
90
- #############################################################################
91
-
92
- desc "Generate and view the site locally"
93
- task :site do
94
- # Generate the dynamic parts of the site.
95
- puts "Generating dynamic..."
96
- require 'gollum'
97
- wiki = Gollum::Wiki.new('.', :base_path => '/doc')
98
- html = wiki.page('god', 'HEAD').formatted_data.gsub("\342\200\231", "'")
99
- template = File.read('./site/index.template.html')
100
- index = template.sub("{{ content }}", html)
101
- File.open('./site/index.html', 'w') do |f|
102
- f.write(index)
103
- end
104
-
105
- puts "Done. Opening in browser..."
106
- sh "open site/index.html"
107
- end
108
-
109
- desc "Commit the local site to the gh-pages branch and deploy"
110
- task :site_release do
111
- # Ensure the gh-pages dir exists so we can generate into it.
112
- puts "Checking for gh-pages dir..."
113
- unless File.exist?("./gh-pages")
114
- puts "No gh-pages directory found. Run the following commands first:"
115
- puts " `git clone git@github.com:mojombo/god gh-pages"
116
- puts " `cd gh-pages"
117
- puts " `git checkout gh-pages`"
118
- exit(1)
119
- end
120
-
121
- # Copy the rest of the site over.
122
- puts "Copying static..."
123
- sh "cp -R site/* gh-pages/"
124
-
125
- # Commit the changes
126
- sha = `git log`.match(/[a-z0-9]{40}/)[0]
127
- sh "cd gh-pages && git add . && git commit -m 'Updating to #{sha}.' && git push"
128
- puts 'Done.'
129
- end