nagios-manage 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/check_check.rb +2 -0
- data/lib/nagios/status.rb +2 -2
- metadata +28 -46
data/bin/check_check.rb
CHANGED
@@ -36,6 +36,8 @@ class Nagios::Status::Model
|
|
36
36
|
self.hosts(host_pattern).each do |host, hostinfo|
|
37
37
|
# Skip hosts if there is no hostinfo (no services associated, etc).
|
38
38
|
next if hostinfo["servicestatus"].nil?
|
39
|
+
# Skip hosts if they are in scheduled downtime
|
40
|
+
next if hostinfo["hostdowntime"].to_i > 0
|
39
41
|
hostinfo["servicestatus"].each do |name, status|
|
40
42
|
next if service_pattern and !service_pattern.match(name)
|
41
43
|
|
data/lib/nagios/status.rb
CHANGED
@@ -24,7 +24,7 @@ module Nagios
|
|
24
24
|
end
|
25
25
|
|
26
26
|
# end of a section
|
27
|
-
if line =~ /\}/ && handler != ""
|
27
|
+
if line =~ /\}/ && handler != "" && self.respond_to?("handle_#{handler}", include_private = true)
|
28
28
|
eval("handle_#{handler}(blocklines)")
|
29
29
|
handler = ""
|
30
30
|
end
|
@@ -326,7 +326,7 @@ module Nagios
|
|
326
326
|
@status["hosts"][host]["hoststatus"] = {} unless @status["hosts"][host]["hoststatus"]
|
327
327
|
|
328
328
|
lines.each do |l|
|
329
|
-
if l =~ /\s+(\w+)=(\
|
329
|
+
if l =~ /\s+(\w+)=(.+)\s*$/
|
330
330
|
@status["hosts"][host]["hoststatus"][$1] = $2
|
331
331
|
end
|
332
332
|
end
|
metadata
CHANGED
@@ -1,68 +1,50 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: nagios-manage
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 5
|
8
|
-
- 4
|
9
|
-
version: 0.5.4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.5
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
12
|
-
|
7
|
+
authors:
|
8
|
+
- R.I. Pienaar, Jordan Sissel
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2011-02-25 00:00:00 -08:00
|
18
|
-
default_executable:
|
12
|
+
date: 2012-02-08 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: Silence alerts, aggregate existing checks, etc.
|
22
15
|
email: rip@devco.net, jls@semicomplete.com
|
23
|
-
executables:
|
24
|
-
|
25
|
-
|
16
|
+
executables:
|
17
|
+
- check_check.rb
|
18
|
+
- nagsrv.rb
|
26
19
|
extensions: []
|
27
|
-
|
28
20
|
extra_rdoc_files: []
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
- bin/nagsrv.rb
|
34
|
-
has_rdoc: true
|
21
|
+
files:
|
22
|
+
- lib/nagios/status.rb
|
23
|
+
- bin/nagsrv.rb
|
24
|
+
- bin/check_check.rb
|
35
25
|
homepage: http://code.google.com/p/ruby-nagios/
|
36
26
|
licenses: []
|
37
|
-
|
38
27
|
post_install_message:
|
39
28
|
rdoc_options: []
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
33
|
none: false
|
46
|
-
requirements:
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
version: "0"
|
52
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
39
|
none: false
|
54
|
-
requirements:
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
- 0
|
59
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
60
44
|
requirements: []
|
61
|
-
|
62
45
|
rubyforge_project:
|
63
|
-
rubygems_version: 1.
|
46
|
+
rubygems_version: 1.8.10
|
64
47
|
signing_key:
|
65
48
|
specification_version: 3
|
66
49
|
summary: nagios-manage - a ruby tool for managing your nagios instance
|
67
50
|
test_files: []
|
68
|
-
|