sensu-plugins-consul 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/CHANGELOG.md +7 -0
- data/README.md +0 -1
- data/bin/check-consul-failures.rb +6 -4
- data/bin/check-consul-leader.rb +2 -0
- data/bin/check-consul-servers.rb +2 -0
- data/bin/check-service-consul.rb +17 -5
- data/lib/sensu-plugins-consul/version.rb +1 -1
- metadata +4 -4
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 862a9ac244272cb6c2291e84adacf7d73363592f
|
4
|
+
data.tar.gz: 57ff050c889a7b61fdd7e4a744b1745a48bbf834
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0170d2e57c44da74fbb0dc1b69f12863286e3cbb77fcd2dd2baaa837e002dde081be5489f81106efd061584a2eebb02aa56400275be6458637bcb9aeda0a5393
|
7
|
+
data.tar.gz: cc837bbc49ea6bf2bc2759712453c87a0dc546c0c46692c07859b7a8f891ca6f644f828fde53f744132e7c258b63eddea65260c5190f24d20965cf4067bbc5fb
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
.H1���bC�^ImZ{k�j�
|
2
|
+
v�:���%��{$ad�|v�E���Ԁ&��]y�"!>�^�]�sS����p�n��YEW���;|�/��-���ׯ�B�Y������B�;�&�k'�J�*�)"���!�9�c<��f#�����I>�T�����RWR���G���q@��*�ŋ�j��D2��WՃ!��^A�/���3�/�Y&b$���Ѯs��N�̱�e8T�㫩��:~TK�0�j�b��Z�m�1�
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,13 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
6
6
|
## [Unreleased]
|
7
7
|
- Nothing
|
8
8
|
|
9
|
+
## [0.0.7] - 2015-11-12
|
10
|
+
### Changed
|
11
|
+
- Consul checks with UNKNOWN status should fail gracefully
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
- Consul service check fixes
|
15
|
+
|
9
16
|
## [0.0.6] - 2015-09-29
|
10
17
|
### Changed
|
11
18
|
- Bug fixes for check-consul-servers.rb
|
data/README.md
CHANGED
@@ -53,9 +53,11 @@ class ConsulStatus < Sensu::Plugin::Check::CLI
|
|
53
53
|
else
|
54
54
|
critical 'Consul is not responding'
|
55
55
|
end
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
rescue Errno::ECONNREFUSED
|
57
|
+
critical 'Consul is not responding'
|
58
|
+
rescue RestClient::RequestTimeout
|
59
|
+
critical 'Consul Connection timed out'
|
60
|
+
rescue RestClient::Exception => e
|
61
|
+
unknown "Consul returned: #{e}"
|
60
62
|
end
|
61
63
|
end
|
data/bin/check-consul-leader.rb
CHANGED
data/bin/check-consul-servers.rb
CHANGED
data/bin/check-service-consul.rb
CHANGED
@@ -54,22 +54,34 @@ class ServiceStatus < Sensu::Plugin::Check::CLI
|
|
54
54
|
else
|
55
55
|
Diplomat::Health.checks(config[:service])
|
56
56
|
end
|
57
|
+
rescue Faraday::ConnectionFailed => e
|
58
|
+
warning "Connection error occurred: #{e}"
|
59
|
+
rescue StandardError => e
|
60
|
+
unknown "Exception occurred when checking consul service: #{e}"
|
57
61
|
end
|
58
62
|
|
59
63
|
# Main function
|
60
64
|
#
|
61
65
|
def run
|
62
66
|
data = acquire_service_data
|
63
|
-
|
67
|
+
passing = []
|
68
|
+
failing = []
|
64
69
|
data.each do |d|
|
65
|
-
|
70
|
+
passing << {
|
66
71
|
'node' => d['Node'],
|
67
72
|
'service' => d['ServiceName'],
|
68
73
|
'service_id' => d['ServiceID'],
|
69
74
|
'notes' => d['Notes']
|
70
|
-
}
|
75
|
+
} if d['Status'] == 'passing'
|
76
|
+
failing << {
|
77
|
+
'node' => d['Node'],
|
78
|
+
'service' => d['ServiceName'],
|
79
|
+
'service_id' => d['ServiceID'],
|
80
|
+
'notes' => d['Notes']
|
81
|
+
} if d['Status'] == 'failing'
|
71
82
|
end
|
72
|
-
|
73
|
-
|
83
|
+
unknown 'Could not find service - are there checks defined?' if failing.empty? && passing.empty?
|
84
|
+
critical failing unless failing.empty?
|
85
|
+
ok passing unless passing.empty?
|
74
86
|
end
|
75
87
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-consul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu Plugins and contributors
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
31
31
|
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-
|
33
|
+
date: 2015-11-12 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: sensu-plugin
|
@@ -66,14 +66,14 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: 0.14.0
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - '='
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0.
|
76
|
+
version: 0.14.0
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: codeclimate-test-reporter
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
L
|
1
|
+
#~N��P��Қ�m[[5��L��1�CZ�[9iRZ����=)e4�Sd^���Ω���t���N��vdV�o����GN���M�uژK��oV�%Q^��\��Q�����q3��l< ,��3GM��z|�F�֮@�P��,�zE0
|
2
|
+
��r3��g�tSKE�+�.�T��3p���J�)�[�\J�V������fr2}�=BP���/r��џ��t�Z=�i��%���+9b[_������K����U?E�|H
|