god 0.12.1 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -2
- data/god.gemspec +2 -2
- data/lib/god.rb +1 -1
- data/lib/god/conditions/cpu_usage.rb +1 -1
- data/lib/god/conditions/disk_usage.rb +1 -1
- data/lib/god/conditions/memory_usage.rb +1 -1
- data/lib/god/conditions/process_running.rb +0 -3
- data/lib/god/conditions/socket_responding.rb +1 -1
- metadata +17 -17
data/History.txt
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
== 0.
|
1
|
+
== 0.13.0 / 2012-09-17
|
2
|
+
* Minor Changes
|
3
|
+
* Reduce verbosity of non-failing conditions (#111)
|
4
|
+
|
5
|
+
== 0.12.1 / 2012-01-21
|
2
6
|
* Bug Fixes
|
3
7
|
* Fix undefined variable problem in CLI (#82)
|
4
8
|
|
5
|
-
== 0.12.0
|
9
|
+
== 0.12.0 / 2012-01-13
|
6
10
|
* Minor Enhancements
|
7
11
|
* Add umask support
|
8
12
|
* Add socket response condition (#25)
|
data/god.gemspec
CHANGED
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
4
4
|
|
5
5
|
s.name = 'god'
|
6
|
-
s.version = '0.
|
7
|
-
s.date = '2012-
|
6
|
+
s.version = '0.13.0'
|
7
|
+
s.date = '2012-09-17'
|
8
8
|
|
9
9
|
s.summary = "Process monitoring framework."
|
10
10
|
s.description = "An easy to configure, easy to extend monitoring framework written in Ruby."
|
data/lib/god.rb
CHANGED
@@ -63,6 +63,7 @@ module God
|
|
63
63
|
def test
|
64
64
|
process = System::Process.new(self.pid)
|
65
65
|
@timeline.push(process.percent_cpu)
|
66
|
+
self.info = []
|
66
67
|
|
67
68
|
history = "[" + @timeline.map { |x| "#{x > self.above ? '*' : ''}#{x}%%" }.join(", ") + "]"
|
68
69
|
|
@@ -70,7 +71,6 @@ module God
|
|
70
71
|
self.info = "cpu out of bounds #{history}"
|
71
72
|
return true
|
72
73
|
else
|
73
|
-
self.info = "cpu within bounds #{history}"
|
74
74
|
return false
|
75
75
|
end
|
76
76
|
end
|
@@ -18,12 +18,12 @@ module God
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def test
|
21
|
+
self.info = []
|
21
22
|
usage = `df -P | grep -i " #{self.mount_point}$" | awk '{print $5}' | sed 's/%//'`
|
22
23
|
if usage.to_i > self.above
|
23
24
|
self.info = "disk space out of bounds"
|
24
25
|
return true
|
25
26
|
else
|
26
|
-
self.info = "disk space ok"
|
27
27
|
return false
|
28
28
|
end
|
29
29
|
end
|
@@ -65,6 +65,7 @@ module God
|
|
65
65
|
def test
|
66
66
|
process = System::Process.new(self.pid)
|
67
67
|
@timeline.push(process.memory)
|
68
|
+
self.info = []
|
68
69
|
|
69
70
|
history = "[" + @timeline.map { |x| "#{x > self.above ? '*' : ''}#{x}kb" }.join(", ") + "]"
|
70
71
|
|
@@ -72,7 +73,6 @@ module God
|
|
72
73
|
self.info = "memory out of bounds #{history}"
|
73
74
|
return true
|
74
75
|
else
|
75
|
-
self.info = "memory within bounds #{history}"
|
76
76
|
return false
|
77
77
|
end
|
78
78
|
end
|
@@ -46,7 +46,6 @@ module God
|
|
46
46
|
active = pid && System::Process.new(pid).exists?
|
47
47
|
|
48
48
|
if (self.running && active)
|
49
|
-
self.info.concat(["process is running"])
|
50
49
|
true
|
51
50
|
elsif (!self.running && !active)
|
52
51
|
self.info.concat(["process is not running"])
|
@@ -54,8 +53,6 @@ module God
|
|
54
53
|
else
|
55
54
|
if self.running
|
56
55
|
self.info.concat(["process is not running"])
|
57
|
-
else
|
58
|
-
self.info.concat(["process is running"])
|
59
56
|
end
|
60
57
|
false
|
61
58
|
end
|
@@ -102,6 +102,7 @@ module God
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def test
|
105
|
+
self.info = []
|
105
106
|
if self.family == 'tcp'
|
106
107
|
begin
|
107
108
|
s = TCPSocket.new(self.addr, self.port)
|
@@ -123,7 +124,6 @@ module God
|
|
123
124
|
self.info = "socket out of bounds #{history}"
|
124
125
|
return true
|
125
126
|
else
|
126
|
-
self.info = "socket within bounds #{history}"
|
127
127
|
return false
|
128
128
|
end
|
129
129
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: god
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 43
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 13
|
9
|
+
- 0
|
10
|
+
version: 0.13.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tom Preston-Werner
|
@@ -17,10 +17,11 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2012-
|
20
|
+
date: 2012-09-17 00:00:00 -07:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
|
+
name: json
|
24
25
|
prerelease: false
|
25
26
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
27
|
none: false
|
@@ -33,9 +34,9 @@ dependencies:
|
|
33
34
|
- 6
|
34
35
|
version: "1.6"
|
35
36
|
type: :development
|
36
|
-
name: json
|
37
37
|
version_requirements: *id001
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
+
name: rake
|
39
40
|
prerelease: false
|
40
41
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
42
|
none: false
|
@@ -48,9 +49,9 @@ dependencies:
|
|
48
49
|
- 9
|
49
50
|
version: "0.9"
|
50
51
|
type: :development
|
51
|
-
name: rake
|
52
52
|
version_requirements: *id002
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
+
name: rdoc
|
54
55
|
prerelease: false
|
55
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
57
|
none: false
|
@@ -63,9 +64,9 @@ dependencies:
|
|
63
64
|
- 10
|
64
65
|
version: "3.10"
|
65
66
|
type: :development
|
66
|
-
name: rdoc
|
67
67
|
version_requirements: *id003
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
|
+
name: twitter
|
69
70
|
prerelease: false
|
70
71
|
requirement: &id004 !ruby/object:Gem::Requirement
|
71
72
|
none: false
|
@@ -78,9 +79,9 @@ dependencies:
|
|
78
79
|
- 0
|
79
80
|
version: "2.0"
|
80
81
|
type: :development
|
81
|
-
name: twitter
|
82
82
|
version_requirements: *id004
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
+
name: prowly
|
84
85
|
prerelease: false
|
85
86
|
requirement: &id005 !ruby/object:Gem::Requirement
|
86
87
|
none: false
|
@@ -93,9 +94,9 @@ dependencies:
|
|
93
94
|
- 3
|
94
95
|
version: "0.3"
|
95
96
|
type: :development
|
96
|
-
name: prowly
|
97
97
|
version_requirements: *id005
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
+
name: xmpp4r
|
99
100
|
prerelease: false
|
100
101
|
requirement: &id006 !ruby/object:Gem::Requirement
|
101
102
|
none: false
|
@@ -108,9 +109,9 @@ dependencies:
|
|
108
109
|
- 5
|
109
110
|
version: "0.5"
|
110
111
|
type: :development
|
111
|
-
name: xmpp4r
|
112
112
|
version_requirements: *id006
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
|
+
name: dike
|
114
115
|
prerelease: false
|
115
116
|
requirement: &id007 !ruby/object:Gem::Requirement
|
116
117
|
none: false
|
@@ -124,9 +125,9 @@ dependencies:
|
|
124
125
|
- 3
|
125
126
|
version: 0.0.3
|
126
127
|
type: :development
|
127
|
-
name: dike
|
128
128
|
version_requirements: *id007
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
|
+
name: snapshot
|
130
131
|
prerelease: false
|
131
132
|
requirement: &id008 !ruby/object:Gem::Requirement
|
132
133
|
none: false
|
@@ -139,9 +140,9 @@ dependencies:
|
|
139
140
|
- 0
|
140
141
|
version: "1.0"
|
141
142
|
type: :development
|
142
|
-
name: snapshot
|
143
143
|
version_requirements: *id008
|
144
144
|
- !ruby/object:Gem::Dependency
|
145
|
+
name: rcov
|
145
146
|
prerelease: false
|
146
147
|
requirement: &id009 !ruby/object:Gem::Requirement
|
147
148
|
none: false
|
@@ -154,9 +155,9 @@ dependencies:
|
|
154
155
|
- 9
|
155
156
|
version: "0.9"
|
156
157
|
type: :development
|
157
|
-
name: rcov
|
158
158
|
version_requirements: *id009
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
|
+
name: daemons
|
160
161
|
prerelease: false
|
161
162
|
requirement: &id010 !ruby/object:Gem::Requirement
|
162
163
|
none: false
|
@@ -169,9 +170,9 @@ dependencies:
|
|
169
170
|
- 1
|
170
171
|
version: "1.1"
|
171
172
|
type: :development
|
172
|
-
name: daemons
|
173
173
|
version_requirements: *id010
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
|
+
name: mocha
|
175
176
|
prerelease: false
|
176
177
|
requirement: &id011 !ruby/object:Gem::Requirement
|
177
178
|
none: false
|
@@ -184,9 +185,9 @@ dependencies:
|
|
184
185
|
- 10
|
185
186
|
version: "0.10"
|
186
187
|
type: :development
|
187
|
-
name: mocha
|
188
188
|
version_requirements: *id011
|
189
189
|
- !ruby/object:Gem::Dependency
|
190
|
+
name: gollum
|
190
191
|
prerelease: false
|
191
192
|
requirement: &id012 !ruby/object:Gem::Requirement
|
192
193
|
none: false
|
@@ -200,7 +201,6 @@ dependencies:
|
|
200
201
|
- 1
|
201
202
|
version: 1.3.1
|
202
203
|
type: :development
|
203
|
-
name: gollum
|
204
204
|
version_requirements: *id012
|
205
205
|
description: An easy to configure, easy to extend monitoring framework written in Ruby.
|
206
206
|
email: god-rb@googlegroups.com
|