sensu-plugins-consul 1.6.0 → 1.6.1
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.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -1
- data/bin/check-consul-servers.rb +5 -2
- data/lib/sensu-plugins-consul/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 921fbb9dc9e457413062488af0f8fd64636f4bedc0deb305d71467603060f600
|
|
4
|
+
data.tar.gz: 84c2f9533f10e2c810c6973c21a1f033bdec538a9f4dcd55ca73a8901f0532af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f9494f5715ab2ab550956f8b994217286709bb8802d1a2db38335dd70c8ff50e341207878c5e5e5f794a051c8188fdec85cf58dbe72593930603f8104c5654f
|
|
7
|
+
data.tar.gz: 37c66408f994098a24dd9b8b13885af0fed8cb8d14199b804359ecba424ed4892484847660222ec6f6ad08740e7da30dddd4790456f6706f32e62226481cdfba
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [1.6.1] - 2018-03-02
|
|
9
|
+
### Fixed
|
|
10
|
+
- Bug fix for `check-consul-servers` so timeout option works (@joshbenner)
|
|
11
|
+
|
|
8
12
|
## [1.6.0] - 2017-09-30
|
|
9
13
|
### Added
|
|
10
14
|
- `check-consul-leader`, `check-consul-members`, and `check-consul-servers` now accept `--insecure`, `--capath`, `--timeout` arguments (@akatch)
|
|
@@ -98,7 +102,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
|
98
102
|
### Added
|
|
99
103
|
- initial release
|
|
100
104
|
|
|
101
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/1.6.
|
|
105
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/1.6.1...HEAD
|
|
106
|
+
[1.6.1]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/1.6.0...1.6.1
|
|
102
107
|
[1.6.0]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/1.5.0...1.6.0
|
|
103
108
|
[1.5.0]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/1.4.1...1.5.0
|
|
104
109
|
[1.4.1]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/1.4.0...1.4.1
|
data/bin/check-consul-servers.rb
CHANGED
|
@@ -51,12 +51,14 @@ class ConsulStatus < Sensu::Plugin::Check::CLI
|
|
|
51
51
|
description: 'minimum number of peers',
|
|
52
52
|
short: '-g GREATER THAN',
|
|
53
53
|
long: '--greater GREATER THAN',
|
|
54
|
+
proc: proc(&:to_i),
|
|
54
55
|
default: 3
|
|
55
56
|
|
|
56
57
|
option :expected,
|
|
57
58
|
description: 'expected number of peers',
|
|
58
59
|
short: '-e EXPECT',
|
|
59
60
|
long: '--expect EXPECT',
|
|
61
|
+
proc: proc(&:to_i),
|
|
60
62
|
default: 5
|
|
61
63
|
|
|
62
64
|
option :scheme,
|
|
@@ -81,6 +83,7 @@ class ConsulStatus < Sensu::Plugin::Check::CLI
|
|
|
81
83
|
description: 'connection will time out after this many seconds',
|
|
82
84
|
short: '-t TIMEOUT_IN_SECONDS',
|
|
83
85
|
long: '--timeout TIMEOUT_IN_SECONDS',
|
|
86
|
+
proc: proc(&:to_i),
|
|
84
87
|
default: 5
|
|
85
88
|
|
|
86
89
|
def run
|
|
@@ -91,9 +94,9 @@ class ConsulStatus < Sensu::Plugin::Check::CLI
|
|
|
91
94
|
|
|
92
95
|
json = RestClient::Resource.new(url, options).get
|
|
93
96
|
peers = JSON.parse(json).length.to_i
|
|
94
|
-
if peers < config[:min]
|
|
97
|
+
if peers < config[:min]
|
|
95
98
|
critical "[#{peers}] peers is below critical threshold of [#{config[:min]}]"
|
|
96
|
-
elsif peers != config[:expected]
|
|
99
|
+
elsif peers != config[:expected]
|
|
97
100
|
warning "[#{peers}] peers is outside of expected count of [#{config[:expected]}]"
|
|
98
101
|
else
|
|
99
102
|
ok 'Peers within threshold'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sensu-plugins-consul
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sensu Plugins and contributors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sensu-plugin
|
|
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
234
234
|
version: '0'
|
|
235
235
|
requirements: []
|
|
236
236
|
rubyforge_project:
|
|
237
|
-
rubygems_version: 2.6
|
|
237
|
+
rubygems_version: 2.7.6
|
|
238
238
|
signing_key:
|
|
239
239
|
specification_version: 4
|
|
240
240
|
summary: Sensu plugins for Consul
|