god 0.7.15 → 0.7.16
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +9 -0
- data/VERSION.yml +1 -1
- data/bin/god +1 -0
- data/god.gemspec +2 -2
- data/lib/god/conditions/disk_usage.rb +9 -4
- data/lib/god/driver.rb +2 -1
- data/lib/god/task.rb +10 -6
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
== 0.7.16 / 2009-08-24
|
2
|
+
* Minor Enhancements
|
3
|
+
* Better logging for disk_usage condition [github.com/lettherebecode]
|
4
|
+
* Bug Fixes
|
5
|
+
* Only sleep if driver delay is > 0 [github.com/ps2]
|
6
|
+
* Rescue Timeout::Error exception due to smtp server timing out [github.com/ps2]
|
7
|
+
* Disk usage condition should use `df -P` to prevent line splitting [github.com/mseppae]
|
8
|
+
* Always require YAML so binary works on dumb systems
|
9
|
+
|
1
10
|
== 0.7.15 / 2009-08-19
|
2
11
|
* Minor Enhancements
|
3
12
|
* Support SSL Campfire connections [github.com/eric]
|
data/VERSION.yml
CHANGED
data/bin/god
CHANGED
data/god.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{god}
|
5
|
-
s.version = "0.7.
|
5
|
+
s.version = "0.7.16"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Tom Preston-Werner"]
|
9
|
-
s.date = %q{2009-08-
|
9
|
+
s.date = %q{2009-08-24}
|
10
10
|
s.default_executable = %q{god}
|
11
11
|
s.description = %q{God is an easy to configure, easy to extend monitoring framework written in Ruby.}
|
12
12
|
s.email = %q{tom@mojombo.com}
|
@@ -18,10 +18,15 @@ module God
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def test
|
21
|
-
usage = `df | grep -i " #{self.mount_point}$" | awk '{print $5}' | sed 's/%//'`
|
22
|
-
usage.to_i > self.above
|
21
|
+
usage = `df -P | grep -i " #{self.mount_point}$" | awk '{print $5}' | sed 's/%//'`
|
22
|
+
if usage.to_i > self.above
|
23
|
+
self.info = "disk space out of bounds"
|
24
|
+
return true
|
25
|
+
else
|
26
|
+
self.info = "disk space ok"
|
27
|
+
return false
|
28
|
+
end
|
23
29
|
end
|
24
30
|
end
|
25
|
-
|
26
31
|
end
|
27
|
-
end
|
32
|
+
end
|
data/lib/god/driver.rb
CHANGED
data/lib/god/task.rb
CHANGED
@@ -479,13 +479,17 @@ module God
|
|
479
479
|
# notify each contact
|
480
480
|
resolved_contacts.each do |c|
|
481
481
|
host = `hostname`.chomp rescue 'none'
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
482
|
+
begin
|
483
|
+
c.notify(message, Time.now, spec[:priority], spec[:category], host)
|
484
|
+
msg = "#{condition.watch.name} #{c.info ? c.info : "notification sent for contact: #{c.name}"} (#{c.base_name})"
|
485
|
+
applog(condition.watch, :info, msg % [])
|
486
|
+
rescue Exception => e
|
487
|
+
applog(condition.watch, :error, "#{e.message} #{e.backtrace}")
|
488
|
+
msg = "#{condition.watch.name} Failed to deliver notification for contact: #{c.name} (#{c.base_name})"
|
489
|
+
applog(condition.watch, :error, msg % [])
|
490
|
+
end
|
487
491
|
end
|
488
492
|
end
|
489
493
|
end
|
490
494
|
|
491
|
-
end
|
495
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: god
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-24 00:00:00 -07:00
|
13
13
|
default_executable: god
|
14
14
|
dependencies: []
|
15
15
|
|