nagira 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +4 -0
- data/app/get/status.rb +1 -0
- data/app/get/status/servicegroups.rb +28 -0
- data/lib/nagira.rb +2 -0
- data/lib/nagira/hostservice.rb +30 -0
- data/lib/nagira/servicegroup.rb +79 -0
- data/spec/get/status/servicegroup.rb +91 -0
- data/test/data/objects.cache +6 -1
- data/version.txt +1 -1
- metadata +63 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9596abd9430f05e653fafca586fd282b8cf44d61
|
4
|
+
data.tar.gz: a9a614392506731afc58b58b8bb0edd8af565379
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 958f5ebadc0ea90b3c6d003ef58b0cf7cb90edeab43d9a9b54503493452e29c5574ce470b3edbad426d8db4d25407818454e19f4d657fde09ac4b76cbff6b985
|
7
|
+
data.tar.gz: e39c5fdb6f4be248c2e1343d562f3bebb1afa4df66046e11b06ba9eac594f26cfb59fa79efd3e1e1411e2ae54d0e13cbf19f568bf1d8e922e6f27dfead247734
|
data/History.md
CHANGED
data/app/get/status.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
class Nagira < Sinatra::Base
|
2
|
+
# @!macro [attach] sinatra.get
|
3
|
+
#
|
4
|
+
# @overload get "$1"
|
5
|
+
#
|
6
|
+
# @return HTTP response. Hash formatted in the format defined by
|
7
|
+
# requested output type(XML, YAML or JSON).
|
8
|
+
#
|
9
|
+
|
10
|
+
|
11
|
+
##
|
12
|
+
# @method get_status_servicegroup
|
13
|
+
#
|
14
|
+
# Endpoint:
|
15
|
+
# - GET /_status/_servicegroup/:servicegroup
|
16
|
+
#
|
17
|
+
# Supported extensions: _state, _list
|
18
|
+
#
|
19
|
+
|
20
|
+
get "/_status/_servicegroup/:servicegroup" do |group_name|
|
21
|
+
|
22
|
+
servicegroup = Servicegroup.new(group_name)
|
23
|
+
|
24
|
+
@data = servicegroup.send(@output)
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
data/lib/nagira.rb
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
class Nagira < Sinatra::Base
|
2
|
+
class HostService
|
3
|
+
|
4
|
+
def initialize(hostname,servicename)
|
5
|
+
@hostname = hostname
|
6
|
+
@servicename = servicename
|
7
|
+
end
|
8
|
+
attr_reader :hostname, :servicename
|
9
|
+
|
10
|
+
def status
|
11
|
+
begin
|
12
|
+
$nagios[:status]
|
13
|
+
.status['hosts'][hostname]['servicestatus'][servicename]
|
14
|
+
rescue NoMethodError
|
15
|
+
{ }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
alias :full :status
|
20
|
+
|
21
|
+
def state
|
22
|
+
status.slice('host_name', 'service_description', 'current_state')
|
23
|
+
end
|
24
|
+
|
25
|
+
def current_state
|
26
|
+
status.slice('current_state')
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
class Nagira < Sinatra::Base
|
2
|
+
class Servicegroup
|
3
|
+
|
4
|
+
##
|
5
|
+
# Single member of servicegroup. In Nagios configuration it is
|
6
|
+
# defined as "<hostname>,<service>". Contructor takes straing as
|
7
|
+
# argument.
|
8
|
+
#
|
9
|
+
class Member
|
10
|
+
def initialize(string)
|
11
|
+
member = string.split ","
|
12
|
+
@hostname = member.first
|
13
|
+
@servicename = member.last
|
14
|
+
end
|
15
|
+
attr_reader :hostname, :servicename
|
16
|
+
|
17
|
+
def service
|
18
|
+
@service ||= Nagira::HostService.new(hostname,servicename)
|
19
|
+
end
|
20
|
+
def status
|
21
|
+
service.status
|
22
|
+
end
|
23
|
+
|
24
|
+
def state
|
25
|
+
service.state
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
def initialize(name)
|
31
|
+
@name = name
|
32
|
+
end
|
33
|
+
attr_reader :name
|
34
|
+
|
35
|
+
def objects
|
36
|
+
@objects ||= $nagios[:objects].objects
|
37
|
+
end
|
38
|
+
|
39
|
+
def servicegroup
|
40
|
+
objects[:servicegroup][name]
|
41
|
+
end
|
42
|
+
|
43
|
+
def members
|
44
|
+
servicegroup[:members].split(/\s+/).map do |mem|
|
45
|
+
Member.new(mem)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def by_hostname
|
50
|
+
members.inject({ }) do |memo,item|
|
51
|
+
memo[item.hostname] ||= []
|
52
|
+
memo[item.hostname] << item.servicename
|
53
|
+
memo
|
54
|
+
end
|
55
|
+
end
|
56
|
+
alias :list :by_hostname
|
57
|
+
|
58
|
+
def output(type)
|
59
|
+
members.reduce({ }) do |memo,member|
|
60
|
+
h,s = member.hostname, member.servicename
|
61
|
+
memo[h] ||= { }
|
62
|
+
memo[h][s] = member.send(type)
|
63
|
+
memo
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def status
|
68
|
+
output(:status)
|
69
|
+
end
|
70
|
+
alias :normal :status
|
71
|
+
|
72
|
+
##
|
73
|
+
# Shortened status informaation. Only :host_name,
|
74
|
+
# :service_description, :current_state
|
75
|
+
def state
|
76
|
+
output(:state)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
describe Nagira do
|
3
|
+
|
4
|
+
include Rack::Test::Methods
|
5
|
+
def app
|
6
|
+
@app ||= Nagira
|
7
|
+
end
|
8
|
+
|
9
|
+
before :all do
|
10
|
+
@servicegroup = "ping"
|
11
|
+
@hosts = %w{archive kurobka airport}.sort
|
12
|
+
end
|
13
|
+
|
14
|
+
context "/_status/_servicegroup/@servicegroup " do
|
15
|
+
|
16
|
+
before do
|
17
|
+
get "/_status/_servicegroup/#{ @servicegroup }"
|
18
|
+
@data = JSON.parse(last_response.body)
|
19
|
+
end
|
20
|
+
|
21
|
+
it "returns servicegroup Hash" do
|
22
|
+
expect(@data).to be_a_kind_of Hash
|
23
|
+
end
|
24
|
+
|
25
|
+
it "servicegroup Hash should contain all hosts" do
|
26
|
+
expect(@data.keys.sort).to eq @hosts
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
context "/_status/_servicegroup/@servicegroup/_list" do
|
33
|
+
|
34
|
+
before do
|
35
|
+
get "/_status/_servicegroup/#{ @servicegroup }/_list"
|
36
|
+
@data = JSON.parse(last_response.body)
|
37
|
+
end
|
38
|
+
|
39
|
+
it "returns Hash" do
|
40
|
+
expect(@data).to be_a_kind_of Hash
|
41
|
+
end
|
42
|
+
|
43
|
+
it "services should be Array's" do
|
44
|
+
expect(@data['kurobka']).to be_a_kind_of Array
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
context "/_status/_servicegroup/@servicegroup/_state" do
|
50
|
+
|
51
|
+
before do
|
52
|
+
get "/_status/_servicegroup/#{ @servicegroup }/_state"
|
53
|
+
@data = JSON.parse(last_response.body)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "returns Hash" do
|
57
|
+
expect(@data).to be_a_kind_of Hash
|
58
|
+
end
|
59
|
+
|
60
|
+
it "service data should contain service names" do
|
61
|
+
expect(@data['kurobka']).to include 'SSH', 'PING'
|
62
|
+
end
|
63
|
+
|
64
|
+
it "service data should contain service attributes" do
|
65
|
+
expect(@data['kurobka']['SSH']).to include 'host_name', 'service_description', 'current_state'
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
context "Data completeness /_status/_servicegroup/@servicegroup" do
|
71
|
+
|
72
|
+
before do
|
73
|
+
get "/_status/_servicegroup/#{ @servicegroup }"
|
74
|
+
@data = JSON.parse(last_response.body)
|
75
|
+
end
|
76
|
+
|
77
|
+
it "returns Hash" do
|
78
|
+
expect(@data).to be_a_kind_of Hash
|
79
|
+
end
|
80
|
+
|
81
|
+
it "service data should contain service names" do
|
82
|
+
expect(@data['kurobka']).to include 'SSH', 'PING'
|
83
|
+
end
|
84
|
+
|
85
|
+
it "service data should contain service attributes" do
|
86
|
+
expect(@data['kurobka']['SSH']).to include 'host_name', 'service_description', 'current_state', 'last_hard_state_change', 'next_notification'
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
data/test/data/objects.cache
CHANGED
@@ -829,6 +829,12 @@ define contactgroup {
|
|
829
829
|
members root
|
830
830
|
}
|
831
831
|
|
832
|
+
define servicegroup {
|
833
|
+
servicegroup_name ping
|
834
|
+
alias All SSH Services
|
835
|
+
members archive,PING kurobka,PING airport,PING kurobka,SSH
|
836
|
+
}
|
837
|
+
|
832
838
|
define hostgroup {
|
833
839
|
hostgroup_name all
|
834
840
|
alias All Servers
|
@@ -1865,4 +1871,3 @@ define service {
|
|
1865
1871
|
retain_status_information 1
|
1866
1872
|
retain_nonstatus_information 1
|
1867
1873
|
}
|
1868
|
-
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
metadata
CHANGED
@@ -1,285 +1,285 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nagira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmytro Kovalov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.8'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.1'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sherlock_os
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec-core
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '3.1'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.1'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec-expectations
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '3.1'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '3.1'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec-mocks
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '3.1'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3.1'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: ruby-nagios
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0.2'
|
132
|
-
- -
|
132
|
+
- - '>='
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: 0.2.2
|
135
135
|
type: :runtime
|
136
136
|
prerelease: false
|
137
137
|
version_requirements: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
|
-
- -
|
139
|
+
- - ~>
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0.2'
|
142
|
-
- -
|
142
|
+
- - '>='
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: 0.2.2
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: sinatra
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
|
-
- -
|
149
|
+
- - ~>
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '1.4'
|
152
152
|
type: :runtime
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
|
-
- -
|
156
|
+
- - ~>
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '1.4'
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: sinatra-contrib
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
|
-
- -
|
163
|
+
- - ~>
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '1.4'
|
166
166
|
type: :runtime
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- -
|
170
|
+
- - ~>
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '1.4'
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: rake
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- -
|
177
|
+
- - ~>
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '10.1'
|
180
180
|
type: :runtime
|
181
181
|
prerelease: false
|
182
182
|
version_requirements: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
|
-
- -
|
184
|
+
- - ~>
|
185
185
|
- !ruby/object:Gem::Version
|
186
186
|
version: '10.1'
|
187
187
|
- !ruby/object:Gem::Dependency
|
188
188
|
name: puma
|
189
189
|
requirement: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
|
-
- -
|
191
|
+
- - ~>
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '2.1'
|
194
194
|
type: :runtime
|
195
195
|
prerelease: false
|
196
196
|
version_requirements: !ruby/object:Gem::Requirement
|
197
197
|
requirements:
|
198
|
-
- -
|
198
|
+
- - ~>
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '2.1'
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: growl
|
203
203
|
requirement: !ruby/object:Gem::Requirement
|
204
204
|
requirements:
|
205
|
-
- -
|
205
|
+
- - ~>
|
206
206
|
- !ruby/object:Gem::Version
|
207
207
|
version: '1'
|
208
208
|
type: :development
|
209
209
|
prerelease: false
|
210
210
|
version_requirements: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
|
-
- -
|
212
|
+
- - ~>
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: '1'
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
name: pry
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|
218
218
|
requirements:
|
219
|
-
- -
|
219
|
+
- - ~>
|
220
220
|
- !ruby/object:Gem::Version
|
221
221
|
version: '0.10'
|
222
222
|
type: :development
|
223
223
|
prerelease: false
|
224
224
|
version_requirements: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
|
-
- -
|
226
|
+
- - ~>
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0.10'
|
229
229
|
- !ruby/object:Gem::Dependency
|
230
230
|
name: guard-brakeman
|
231
231
|
requirement: !ruby/object:Gem::Requirement
|
232
232
|
requirements:
|
233
|
-
- -
|
233
|
+
- - ~>
|
234
234
|
- !ruby/object:Gem::Version
|
235
235
|
version: '0.5'
|
236
236
|
type: :development
|
237
237
|
prerelease: false
|
238
238
|
version_requirements: !ruby/object:Gem::Requirement
|
239
239
|
requirements:
|
240
|
-
- -
|
240
|
+
- - ~>
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: '0.5'
|
243
243
|
- !ruby/object:Gem::Dependency
|
244
244
|
name: guard-rspec
|
245
245
|
requirement: !ruby/object:Gem::Requirement
|
246
246
|
requirements:
|
247
|
-
- -
|
247
|
+
- - ~>
|
248
248
|
- !ruby/object:Gem::Version
|
249
249
|
version: '4'
|
250
250
|
type: :development
|
251
251
|
prerelease: false
|
252
252
|
version_requirements: !ruby/object:Gem::Requirement
|
253
253
|
requirements:
|
254
|
-
- -
|
254
|
+
- - ~>
|
255
255
|
- !ruby/object:Gem::Version
|
256
256
|
version: '4'
|
257
257
|
- !ruby/object:Gem::Dependency
|
258
258
|
name: yard
|
259
259
|
requirement: !ruby/object:Gem::Requirement
|
260
260
|
requirements:
|
261
|
-
- -
|
261
|
+
- - ~>
|
262
262
|
- !ruby/object:Gem::Version
|
263
263
|
version: '0.8'
|
264
264
|
type: :development
|
265
265
|
prerelease: false
|
266
266
|
version_requirements: !ruby/object:Gem::Requirement
|
267
267
|
requirements:
|
268
|
-
- -
|
268
|
+
- - ~>
|
269
269
|
- !ruby/object:Gem::Version
|
270
270
|
version: '0.8'
|
271
271
|
- !ruby/object:Gem::Dependency
|
272
272
|
name: redcarpet
|
273
273
|
requirement: !ruby/object:Gem::Requirement
|
274
274
|
requirements:
|
275
|
-
- -
|
275
|
+
- - ~>
|
276
276
|
- !ruby/object:Gem::Version
|
277
277
|
version: '3.0'
|
278
278
|
type: :development
|
279
279
|
prerelease: false
|
280
280
|
version_requirements: !ruby/object:Gem::Requirement
|
281
281
|
requirements:
|
282
|
-
- -
|
282
|
+
- - ~>
|
283
283
|
- !ruby/object:Gem::Version
|
284
284
|
version: '3.0'
|
285
285
|
description: |2+
|
@@ -298,28 +298,26 @@ executables:
|
|
298
298
|
extensions: []
|
299
299
|
extra_rdoc_files: []
|
300
300
|
files:
|
301
|
+
- bin/nagira
|
301
302
|
- History.md
|
302
303
|
- Rakefile
|
304
|
+
- version.txt
|
303
305
|
- app/app.rb
|
304
306
|
- app/get/config.rb
|
305
307
|
- app/get/objects.rb
|
306
|
-
- app/get/status.rb
|
307
308
|
- app/get/status/hostgroups.rb
|
308
|
-
- app/
|
309
|
+
- app/get/status/servicegroups.rb
|
310
|
+
- app/get/status.rb
|
309
311
|
- app/put/host.rb
|
310
312
|
- app/put/status.rb
|
311
|
-
-
|
312
|
-
- bin/nagira-setup
|
313
|
-
- config/defaults.rb
|
314
|
-
- config/environment.rb
|
315
|
-
- config/nagira.defaults
|
316
|
-
- config/nagira.init_d
|
317
|
-
- config/puma.rb
|
318
|
-
- lib/nagira.rb
|
313
|
+
- app/put.rb
|
319
314
|
- lib/nagira/background_parse.rb
|
320
315
|
- lib/nagira/hostgroup.rb
|
316
|
+
- lib/nagira/hostservice.rb
|
321
317
|
- lib/nagira/nagios.rb
|
318
|
+
- lib/nagira/servicegroup.rb
|
322
319
|
- lib/nagira/timed_parse.rb
|
320
|
+
- lib/nagira.rb
|
323
321
|
- lib/tasks/config.rake
|
324
322
|
- lib/tasks/debug.rake
|
325
323
|
- lib/tasks/doc.rake
|
@@ -333,28 +331,34 @@ files:
|
|
333
331
|
- spec/get/status/endpoints_spec.rb
|
334
332
|
- spec/get/status/hostgroup.rb
|
335
333
|
- spec/get/status/hosts_spec.rb
|
334
|
+
- spec/get/status/servicegroup.rb
|
336
335
|
- spec/get/status/services_spec.rb
|
337
336
|
- spec/put/host_spec.rb
|
338
337
|
- spec/put/status_spec.rb
|
339
338
|
- spec/put/support.rb
|
340
339
|
- spec/spec_helper.rb
|
340
|
+
- config/defaults.rb
|
341
|
+
- config/environment.rb
|
342
|
+
- config/nagira.defaults
|
343
|
+
- config/nagira.init_d
|
344
|
+
- config/puma.rb
|
341
345
|
- test/benchmark.rb
|
342
|
-
- test/data/bad/README
|
343
346
|
- test/data/bad/nagios.cfg
|
344
347
|
- test/data/bad/objects.cache
|
348
|
+
- test/data/bad/README
|
345
349
|
- test/data/bad/status.dat
|
346
350
|
- test/data/json/GET.txt
|
347
|
-
- test/data/json/README.txt
|
348
351
|
- test/data/json/host_check.json
|
349
352
|
- test/data/json/host_check.sh
|
350
353
|
- test/data/json/ping.json
|
351
354
|
- test/data/json/ping_and_http.json
|
352
355
|
- test/data/json/ping_and_http_check.sh
|
353
356
|
- test/data/json/ping_check.sh
|
357
|
+
- test/data/json/README.txt
|
354
358
|
- test/data/nagios.cfg
|
355
359
|
- test/data/objects.cache
|
356
360
|
- test/data/status.dat
|
357
|
-
-
|
361
|
+
- bin/nagira-setup
|
358
362
|
homepage: http://dmytro.github.com/nagira
|
359
363
|
licenses:
|
360
364
|
- MIT
|
@@ -366,18 +370,19 @@ require_paths:
|
|
366
370
|
- lib
|
367
371
|
required_ruby_version: !ruby/object:Gem::Requirement
|
368
372
|
requirements:
|
369
|
-
- -
|
373
|
+
- - '>='
|
370
374
|
- !ruby/object:Gem::Version
|
371
375
|
version: 1.9.1
|
372
376
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
373
377
|
requirements:
|
374
|
-
- -
|
378
|
+
- - '>='
|
375
379
|
- !ruby/object:Gem::Version
|
376
380
|
version: '0'
|
377
381
|
requirements: []
|
378
382
|
rubyforge_project:
|
379
|
-
rubygems_version: 2.
|
383
|
+
rubygems_version: 2.0.14
|
380
384
|
signing_key:
|
381
385
|
specification_version: 4
|
382
386
|
summary: 'Nagira : Nagios RESTful API'
|
383
387
|
test_files: []
|
388
|
+
has_rdoc:
|