sensu-plugins-zookeeper 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/bin/check-zookeeper-cluster.rb +0 -7
- data/bin/check-zookeeper-mode.rb +10 -4
- data/bin/metrics-zookeeper.rb +16 -4
- data/lib/sensu-plugins-zookeeper/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbff5ca8017a67540ee0e3460626562dd1e584aa882bbf1ecd5d16c7853528ef
|
4
|
+
data.tar.gz: 782756085bfbc2284ae6f9a2bd05346a8c984c2c28b3224f9975a3191bfb59c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00c793488c17da38a9f7be98d49769a30eec26691f24a2439487b6964079dffa98697a27894494075fd8fb35753601904c8a39d35fc6d4f45d263fa050d8f587
|
7
|
+
data.tar.gz: c14da55994f9d5e221edf89278a94170eba0e5fa4acc15b4ec03b07595c4d68fd4b7fe4b3044f1621f66c7028335fc15112595c42554ee31e83bf935ec906e42
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,16 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [3.1.0] - 2021-03-31
|
10
|
+
|
11
|
+
### Changes
|
12
|
+
- Use TCPSocket logic with timeout for check-zookeeper-mode.rb and metricz-zookepper.rb
|
13
|
+
- Update development_dependency: yard >= 0.9.20
|
14
|
+
- Remove CentOS 6 Asset build, CentOS6 reach end of life
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
- Remove deplicate count option in check-zookeeper-cluster.rb
|
18
|
+
|
9
19
|
## [3.0.0] - 2020-03-19
|
10
20
|
### Breaking Changes
|
11
21
|
- Bump `sensu-plugin` dependency to `~> 4.0` you can read the changelog entries for [4.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#400---2018-02-17), [3.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#300---2018-12-04), and [2.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#v200---2017-03-29)
|
@@ -98,7 +108,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|
98
108
|
### Added
|
99
109
|
- initial release
|
100
110
|
|
101
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/3.
|
111
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/3.1.0...HEAD
|
112
|
+
[3.1.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/3.0.0...3.1.0
|
102
113
|
[3.0.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/2.0.0...3.0.0
|
103
114
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/1.5.0...2.0.0
|
104
115
|
[1.5.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/1.4.0...1.5.0
|
@@ -44,13 +44,6 @@ class CheckZookeeperCluster < Sensu::Plugin::Check::CLI
|
|
44
44
|
default: 2181,
|
45
45
|
proc: proc(&:to_i)
|
46
46
|
|
47
|
-
option :count,
|
48
|
-
description: 'Zookeeper cluster node count',
|
49
|
-
short: '-c count',
|
50
|
-
long: '--count count',
|
51
|
-
default: 3,
|
52
|
-
proc: proc(&:to_i)
|
53
|
-
|
54
47
|
option :exhibitor,
|
55
48
|
description: 'exhibitor end node for status checks',
|
56
49
|
short: '-e Exhibitor status end point',
|
data/bin/check-zookeeper-mode.rb
CHANGED
@@ -53,10 +53,16 @@ class CheckZookeeperMode < Sensu::Plugin::Check::CLI
|
|
53
53
|
required: true
|
54
54
|
|
55
55
|
def zk_command(four_letter_word)
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
TCPSocket.open(config[:server], config[:port]) do |socket|
|
57
|
+
socket.write four_letter_word.to_s
|
58
|
+
ready = IO.select([socket], nil, nil, config[:timeout])
|
59
|
+
|
60
|
+
if ready.nil?
|
61
|
+
critical %(Zookeeper did not respond to #{four_letter_word} within #{config[:timeout]} seconds)
|
62
|
+
end
|
63
|
+
|
64
|
+
result = ready.first.first.read.chomp
|
65
|
+
return result
|
60
66
|
end
|
61
67
|
end
|
62
68
|
|
data/bin/metrics-zookeeper.rb
CHANGED
@@ -38,6 +38,13 @@ class ZookeeperMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
38
38
|
proc: proc(&:to_i),
|
39
39
|
default: 2181
|
40
40
|
|
41
|
+
option :timeout,
|
42
|
+
description: 'How long to wait for a reply in seconds.',
|
43
|
+
short: '-t SECS',
|
44
|
+
long: '--timeout SECS',
|
45
|
+
proc: proc(&:to_i),
|
46
|
+
default: 5
|
47
|
+
|
41
48
|
option :scheme,
|
42
49
|
description: 'Metric naming scheme, text to prepend to metrics',
|
43
50
|
long: '--scheme SCHEME',
|
@@ -48,10 +55,15 @@ class ZookeeperMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
48
55
|
end
|
49
56
|
|
50
57
|
def zk_command(four_letter_word)
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
58
|
+
TCPSocket.open(config[:server], config[:port]) do |socket|
|
59
|
+
socket.write four_letter_word.to_s
|
60
|
+
ready = IO.select([socket], nil, nil, config[:timeout])
|
61
|
+
|
62
|
+
if ready.nil?
|
63
|
+
critical %(Zookeeper did not respond to '#{four_letter_word}' within #{config[:timeout]} seconds)
|
64
|
+
end
|
65
|
+
result = ready.first.first.read.chomp
|
66
|
+
return result
|
55
67
|
end
|
56
68
|
end
|
57
69
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-zookeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
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: 2021-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 0.9.20
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 0.9.20
|
167
167
|
description: Zookeeper plugins for checks and metrics
|
168
168
|
email: "<sensu-users@googlegroups.com>"
|
169
169
|
executables:
|
@@ -218,8 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
218
|
- !ruby/object:Gem::Version
|
219
219
|
version: '0'
|
220
220
|
requirements: []
|
221
|
-
|
222
|
-
rubygems_version: 2.7.7
|
221
|
+
rubygems_version: 3.0.8
|
223
222
|
signing_key:
|
224
223
|
specification_version: 4
|
225
224
|
summary: Sensu plugins for zookeeper
|