hq-log-monitor-server 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 47ecb55ac2d4cac77b0a76ee9e0b28d3ac21ab0d
4
+ data.tar.gz: 57d10b0925b1de2138a7c93c3d408bc0c10172b2
5
+ SHA512:
6
+ metadata.gz: 875fdd148119bbc7bd852b52ca5e851a1d53abe23945b6af99da88eece4abec09f6deb19247aa157863f64909b63eede34cb9fea22eb99e17a1809c804bebe1b
7
+ data.tar.gz: e832a79726f940f2ab94d6073beca405eeb926994754d560a257c80e5ea202d167ca0df41816f9d1759423cfe33675d848e42891f71804dbede4bbeba2e65f53
@@ -0,0 +1,85 @@
1
+ @log-monitor-server
2
+ Feature: Icinga updates
3
+
4
+ Background:
5
+
6
+ Given the log monitor server config:
7
+ """
8
+ <log-monitor-server-config>
9
+ <server port="${port}"/>
10
+ <db host="${db-host}" port="${db-port}" name="${db-name}"/>
11
+ <icinga command-file="${command-file}">
12
+ <service name="service" icinga-host="host" icinga-service="service">
13
+ <type name="none" level="none"/>
14
+ <type name="warning" level="warning"/>
15
+ <type name="critical" level="critical"/>
16
+ </service>
17
+ </icinga>
18
+ <assets bootstrap=""/>
19
+ </log-monitor-server-config>
20
+ """
21
+
22
+ And the time is 123456
23
+
24
+ Scenario: Level none
25
+
26
+ When I submit the following event:
27
+ """
28
+ {
29
+ type: none,
30
+ source: { class: class, host: host, service: service },
31
+ location: { file: logfile, line: 0 },
32
+ lines: {
33
+ before: [],
34
+ matching: NONE blah,
35
+ after: [],
36
+ }
37
+ }
38
+ """
39
+
40
+ Then icinga should receive:
41
+ """
42
+ [123456] PROCESS_SERVICE_CHECK_RESULT;host;service;0;OK 1 other
43
+ """
44
+
45
+ Scenario: Level warning
46
+
47
+ When I submit the following event:
48
+ """
49
+ {
50
+ type: warning,
51
+ source: { class: class, host: host, service: service },
52
+ location: { file: logfile, line: 0 },
53
+ lines: {
54
+ before: [],
55
+ matching: WARNING blah,
56
+ after: [],
57
+ }
58
+ }
59
+ """
60
+
61
+ Then icinga should receive:
62
+ """
63
+ [123456] PROCESS_SERVICE_CHECK_RESULT;host;service;1;WARNING 1 warning
64
+ """
65
+
66
+ Scenario: Level warning
67
+
68
+ When I submit the following event:
69
+ """
70
+ {
71
+ type: critical,
72
+ source: { class: class, host: host, service: service },
73
+ location: { file: logfile, line: 0 },
74
+ lines: {
75
+ before: [],
76
+ matching: CRITICAL blah,
77
+ after: [],
78
+ }
79
+ }
80
+ """
81
+
82
+ Then icinga should receive:
83
+ """
84
+ [123456] PROCESS_SERVICE_CHECK_RESULT;host;service;2;CRITICAL 1 critical
85
+ """
@@ -127,6 +127,7 @@ class Script
127
127
 
128
128
  critical_count = 0
129
129
  warning_count = 0
130
+ other_count = 0
130
131
  unknown_count = 0
131
132
 
132
133
  summaries =
@@ -137,12 +138,14 @@ class Script
137
138
  |type_name, type_info|
138
139
 
139
140
  case level_for_type service_name, type_name
140
- when "critical"
141
- critical_count += type_info["new"]
142
- when "warning"
143
- warning_count += type_info["new"]
144
- else
145
- unknown_count += type_info["new"]
141
+ when "critical"
142
+ critical_count += type_info["new"]
143
+ when "warning"
144
+ warning_count += type_info["new"]
145
+ when "none"
146
+ other_count += type_info["new"]
147
+ else
148
+ unknown_count += type_info["new"]
146
149
  end
147
150
 
148
151
  end
@@ -180,6 +183,10 @@ class Script
180
183
  parts << "%d warning" % warning_count
181
184
  end
182
185
 
186
+ if other_count > 0
187
+ parts << "%d other" % other_count
188
+ end
189
+
183
190
  if unknown_count > 0
184
191
  parts << "%d unknown" % unknown_count
185
192
  end
metadata CHANGED
@@ -1,224 +1,211 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hq-log-monitor-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
5
- prerelease:
4
+ version: 0.9.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - James Pharaoh
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-09 00:00:00.000000000 Z
11
+ date: 2013-05-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bson_ext
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
- version: 1.8.2
19
+ version: 1.8.5
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
- version: 1.8.2
26
+ version: 1.8.5
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: hq-tools
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
- version: 0.2.0
33
+ version: 0.8.1
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
- version: 0.2.0
40
+ version: 0.8.1
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: libxml-ruby
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 2.6.0
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 2.6.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: mongo
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
- version: 1.8.2
61
+ version: 1.8.5
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
- version: 1.8.2
68
+ version: 1.8.5
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: multi_json
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
- version: 1.6.1
75
+ version: 1.7.2
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
- version: 1.6.1
82
+ version: 1.7.2
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rack
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: 1.5.1
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: 1.5.1
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: capybara
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: 2.0.2
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: 2.0.2
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: cucumber
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
- version: 1.2.1
117
+ version: 1.3.1
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
- version: 1.2.1
124
+ version: 1.3.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: hq-dev
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: 0.0.18
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: 0.0.18
142
139
  - !ruby/object:Gem::Dependency
143
140
  name: json
144
141
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
142
  requirements:
147
- - - ! '>='
143
+ - - '>='
148
144
  - !ruby/object:Gem::Version
149
145
  version: 1.7.7
150
146
  type: :development
151
147
  prerelease: false
152
148
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
149
  requirements:
155
- - - ! '>='
150
+ - - '>='
156
151
  - !ruby/object:Gem::Version
157
152
  version: 1.7.7
158
153
  - !ruby/object:Gem::Dependency
159
154
  name: rake
160
155
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
156
  requirements:
163
- - - ! '>='
157
+ - - '>='
164
158
  - !ruby/object:Gem::Version
165
- version: 10.0.3
159
+ version: 10.0.4
166
160
  type: :development
167
161
  prerelease: false
168
162
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
163
  requirements:
171
- - - ! '>='
164
+ - - '>='
172
165
  - !ruby/object:Gem::Version
173
- version: 10.0.3
166
+ version: 10.0.4
174
167
  - !ruby/object:Gem::Dependency
175
168
  name: rspec
176
169
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
170
  requirements:
179
- - - ! '>='
171
+ - - '>='
180
172
  - !ruby/object:Gem::Version
181
- version: 2.12.0
173
+ version: 2.13.0
182
174
  type: :development
183
175
  prerelease: false
184
176
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
177
  requirements:
187
- - - ! '>='
178
+ - - '>='
188
179
  - !ruby/object:Gem::Version
189
- version: 2.12.0
180
+ version: 2.13.0
190
181
  - !ruby/object:Gem::Dependency
191
182
  name: rspec_junit_formatter
192
183
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
184
  requirements:
195
- - - ! '>='
185
+ - - '>='
196
186
  - !ruby/object:Gem::Version
197
- version: '0'
187
+ version: 0.1.6
198
188
  type: :development
199
189
  prerelease: false
200
190
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
191
  requirements:
203
- - - ! '>='
192
+ - - '>='
204
193
  - !ruby/object:Gem::Version
205
- version: '0'
194
+ version: 0.1.6
206
195
  - !ruby/object:Gem::Dependency
207
196
  name: simplecov
208
197
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
198
  requirements:
211
- - - ! '>='
199
+ - - '>='
212
200
  - !ruby/object:Gem::Version
213
- version: '0'
201
+ version: 0.7.1
214
202
  type: :development
215
203
  prerelease: false
216
204
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
205
  requirements:
219
- - - ! '>='
206
+ - - '>='
220
207
  - !ruby/object:Gem::Version
221
- version: '0'
208
+ version: 0.7.1
222
209
  description: HQ log monitor system, central component
223
210
  email:
224
211
  - james@phsys.co.uk
@@ -240,6 +227,7 @@ files:
240
227
  - features/service-host-page.feature
241
228
  - features/submit-event.feature
242
229
  - features/overview-page.feature
230
+ - features/icinga.feature
243
231
  - features/support/steps.rb
244
232
  - features/support/time.rb
245
233
  - features/support/env.rb
@@ -248,33 +236,33 @@ files:
248
236
  - bin/hq-log-monitor-server
249
237
  homepage: https://github.com/jamespharaoh/hq-log-monitor-server
250
238
  licenses: []
239
+ metadata: {}
251
240
  post_install_message:
252
241
  rdoc_options: []
253
242
  require_paths:
254
243
  - lib
255
244
  required_ruby_version: !ruby/object:Gem::Requirement
256
- none: false
257
245
  requirements:
258
- - - ! '>='
246
+ - - '>='
259
247
  - !ruby/object:Gem::Version
260
248
  version: '0'
261
249
  required_rubygems_version: !ruby/object:Gem::Requirement
262
- none: false
263
250
  requirements:
264
- - - ! '>='
251
+ - - '>='
265
252
  - !ruby/object:Gem::Version
266
253
  version: 1.3.6
267
254
  requirements: []
268
255
  rubyforge_project: hq-log-monitor-server
269
- rubygems_version: 1.8.23
256
+ rubygems_version: 2.0.3
270
257
  signing_key:
271
- specification_version: 3
258
+ specification_version: 4
272
259
  summary: HQ log monitor server
273
260
  test_files:
274
261
  - features/event-page.feature
275
262
  - features/service-host-page.feature
276
263
  - features/submit-event.feature
277
264
  - features/overview-page.feature
265
+ - features/icinga.feature
278
266
  - features/support/steps.rb
279
267
  - features/support/time.rb
280
268
  - features/support/env.rb