sensu 0.25.4 → 0.25.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/sensu/api/process.rb +8 -18
- data/lib/sensu/api/utilities/transport_info.rb +8 -3
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/server/process.rb +9 -12
- metadata +3 -4
- data/lib/sensu/#test.json# +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02d86ad1519a656086b16c960bbca484bb92a4ca
|
4
|
+
data.tar.gz: da7868c4ce10e396a97630a2888aaad5ce45014d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 217e47e5de21cba8aba1aba6da58a56b87172f55f1ef254529cf29b17faffcff187fefc31ebd822cc92ed2fd5cdd2bf1c5b5cff565ffd39a1e0482b2d0885770
|
7
|
+
data.tar.gz: 8af3432ae93ab3d5282b4ab717252dbac9bd352cb1663a5f167f026671caf378df03ce2edb2506c64ae5924cd3e13ba76748f6da728d8aa94822ec266419db03
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## 0.25.5 - 2016-07-12
|
2
|
+
|
3
|
+
### Fixes
|
4
|
+
|
5
|
+
Reverted the Sensu API race condition fix, it was a red herring. Desired
|
6
|
+
behaviour has been restored.
|
7
|
+
|
8
|
+
Custom check definition attributes are now included in check request
|
9
|
+
payloads, fixing check attribute token substitution for pubsub checks.
|
10
|
+
|
11
|
+
Transport connectivity issues are now handled while querying the Transport
|
12
|
+
for pipe stats for API `/info` and `/health`.
|
13
|
+
|
1
14
|
## 0.25.4 - 2016-06-20
|
2
15
|
|
3
16
|
### Fixes
|
data/lib/sensu/api/process.rb
CHANGED
@@ -15,23 +15,13 @@ module Sensu
|
|
15
15
|
def self.run(options={})
|
16
16
|
api = self.new(options)
|
17
17
|
EM::run do
|
18
|
+
api.setup_redis
|
19
|
+
api.setup_transport
|
18
20
|
api.start
|
19
21
|
api.setup_signal_traps
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
23
|
-
# Setup connections to redis and transport
|
24
|
-
#
|
25
|
-
# @yield [Object] a callback/block to be called after redis and
|
26
|
-
# transport connections have been established.
|
27
|
-
def setup_connections
|
28
|
-
setup_redis do |redis|
|
29
|
-
setup_transport do |transport|
|
30
|
-
yield if block_given?
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
25
|
# Start the API HTTP server. This method sets `@http_server`.
|
36
26
|
#
|
37
27
|
# @param bind [String] address to listen on.
|
@@ -56,10 +46,7 @@ module Sensu
|
|
56
46
|
api = @settings[:api] || {}
|
57
47
|
bind = api[:bind] || "0.0.0.0"
|
58
48
|
port = api[:port] || 4567
|
59
|
-
|
60
|
-
start_http_server(bind, port)
|
61
|
-
yield if block_given?
|
62
|
-
end
|
49
|
+
start_http_server(bind, port)
|
63
50
|
super
|
64
51
|
end
|
65
52
|
|
@@ -80,8 +67,11 @@ module Sensu
|
|
80
67
|
# @param options [Hash]
|
81
68
|
def self.test(options={})
|
82
69
|
api = self.new(options)
|
83
|
-
api.
|
84
|
-
|
70
|
+
api.setup_redis do
|
71
|
+
api.setup_transport do
|
72
|
+
api.start
|
73
|
+
yield
|
74
|
+
end
|
85
75
|
end
|
86
76
|
end
|
87
77
|
end
|
@@ -17,13 +17,18 @@ module Sensu
|
|
17
17
|
:messages => nil,
|
18
18
|
:consumers => nil
|
19
19
|
},
|
20
|
-
:connected =>
|
20
|
+
:connected => false
|
21
21
|
}
|
22
22
|
if @transport.connected?
|
23
23
|
@transport.stats("keepalives") do |stats|
|
24
24
|
info[:keepalives] = stats
|
25
|
-
@transport.
|
26
|
-
|
25
|
+
if @transport.connected?
|
26
|
+
@transport.stats("results") do |stats|
|
27
|
+
info[:results] = stats
|
28
|
+
info[:connected] = @transport.connected?
|
29
|
+
yield(info)
|
30
|
+
end
|
31
|
+
else
|
27
32
|
yield(info)
|
28
33
|
end
|
29
34
|
end
|
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/server/process.rb
CHANGED
@@ -641,22 +641,19 @@ module Sensu
|
|
641
641
|
end
|
642
642
|
|
643
643
|
# Publish a check request to the Transport. A check request is
|
644
|
-
# composed of a check
|
645
|
-
# `:
|
646
|
-
#
|
647
|
-
#
|
648
|
-
#
|
644
|
+
# composed of a check definition (minus `:subscribers` and
|
645
|
+
# `:interval`) and an `:issued` timestamp. The check request is
|
646
|
+
# published to a Transport pipe, for each of the check
|
647
|
+
# `:subscribers` in its definition, eg. "webserver". JSON
|
648
|
+
# serialization is used when publishing the check request
|
649
649
|
# payload to the Transport pipes. Transport errors are logged.
|
650
650
|
#
|
651
651
|
# @param check [Hash] definition.
|
652
652
|
def publish_check_request(check)
|
653
|
-
payload =
|
654
|
-
:
|
655
|
-
|
656
|
-
|
657
|
-
payload[:command] = check[:command] if check.has_key?(:command)
|
658
|
-
payload[:source] = check[:source] if check.has_key?(:source)
|
659
|
-
payload[:extension] = check[:extension] if check.has_key?(:extension)
|
653
|
+
payload = check.reject do |key, value|
|
654
|
+
[:subscribers, :interval].include?(key)
|
655
|
+
end
|
656
|
+
payload[:issued] = Time.now.to_i
|
660
657
|
@logger.info("publishing check request", {
|
661
658
|
:payload => payload,
|
662
659
|
:subscribers => check[:subscribers]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
@@ -227,7 +227,6 @@ files:
|
|
227
227
|
- exe/sensu-install
|
228
228
|
- exe/sensu-server
|
229
229
|
- lib/sensu.rb
|
230
|
-
- lib/sensu/#test.json#
|
231
230
|
- lib/sensu/api/http_handler.rb
|
232
231
|
- lib/sensu/api/process.rb
|
233
232
|
- lib/sensu/api/routes.rb
|
@@ -280,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
279
|
version: '0'
|
281
280
|
requirements: []
|
282
281
|
rubyforge_project:
|
283
|
-
rubygems_version: 2.6.
|
282
|
+
rubygems_version: 2.6.3
|
284
283
|
signing_key:
|
285
284
|
specification_version: 4
|
286
285
|
summary: A monitoring framework
|
data/lib/sensu/#test.json#
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
"checks": {
|
4
|
-
|
5
|
-
"check_procs_slapd": {
|
6
|
-
|
7
|
-
"command": "/usr/local/nagios/libexec/check_procs -c 1:4 -w 1:4 -a libexec/slapd",
|
8
|
-
|
9
|
-
"subscribers": ["EBB_CKPRC_SLAPD", "EBB"],
|
10
|
-
|
11
|
-
"interval": 60
|
12
|
-
|
13
|
-
},
|
14
|
-
|
15
|
-
"check_procs_syslog-ng": {
|
16
|
-
|
17
|
-
"command": "/usr/local/nagios/libexec/check_procs -w 1:4 -c 1:4 -a syslog-ng",
|
18
|
-
|
19
|
-
"subscribers": ["EBB_CKPRC_SYSLOGNG", "EBB"],
|
20
|
-
|
21
|
-
"interval": 60
|
22
|
-
|
23
|
-
},
|
24
|
-
|
25
|
-
"check_procs_total_procs": {
|
26
|
-
|
27
|
-
"command": "/usr/local/nagios/libexec/check_procs -w 150 -c 250",
|
28
|
-
|
29
|
-
"subscribers": ["EBB_CKPRC_TOTAL", "EBB"],
|
30
|
-
|
31
|
-
"interval": 60
|
32
|
-
|
33
|
-
}
|
34
|
-
|
35
|
-
}
|
36
|
-
|
37
|
-
}
|