sensu-plugins-zookeeper 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/CHANGELOG.md +10 -3
- data/README.md +0 -1
- data/bin/check-zookeeper-ruok.rb +70 -0
- data/lib/sensu-plugins-zookeeper/version.rb +2 -2
- metadata +58 -78
- checksums.yaml.gz.sig +0 -2
- data.tar.gz.sig +0 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZjY1OTI0YzY0MzdkMmM4MGE2ZTNjYmRlY2RmNDdhOWM5ZDk3ZWNkNQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MjRjYjBmMjgxYWQ1NmFjYjY3Y2E0MzE5MTdjMjkyYjIxOTNkMjBlNg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MmZkMjI5ZGJiOGU1M2JhMmJiYTNkNTI0YzRjOWE2ZDMyNzM1M2MyMmNiMmI1
|
10
|
+
ODhhYzU0ODBkMzhjZDQzMzYzMWYyMGQ1NDc0YTFiMmM0NmE5N2YwZmIxYzlk
|
11
|
+
N2QwYTY2N2ZhMDYzMWNiOTE1MGEyZTM2NGEyYjU1NWExNmYwZDA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YWNiYTkzYmUxNmIzNTNhMzU1MjllOGU4ODQ2NDcwNmM5MWU1MzNkOWVkMDkz
|
14
|
+
NjhlZjExYjAxN2I4YWE0YzFiNmI4OTA5N2ZhNWIwZTU3Mzk4N2Q1YjFjODJk
|
15
|
+
MTgzOWVjZmUyMWRmMTAyNmUyZTU2NDYzZjI3NDA1MTA0MGJjOTk=
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
3
3
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
|
-
## Unreleased]
|
6
|
+
## [Unreleased]
|
7
|
+
|
8
|
+
## [0.1.0] - 2016-01-06
|
9
|
+
### Added
|
10
|
+
- check-zookeeper-ruok
|
7
11
|
|
8
12
|
## [0.0.4] - 2015-12-10
|
9
13
|
### Added
|
@@ -15,7 +19,6 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
15
19
|
- updated sensu-plugin gem to 1.2.0
|
16
20
|
|
17
21
|
## [0.0.2] - 2015-06-03
|
18
|
-
|
19
22
|
### Fixed
|
20
23
|
- added binstubs
|
21
24
|
|
@@ -23,7 +26,11 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
23
26
|
- removed cruft from /lib
|
24
27
|
|
25
28
|
## 0.0.1 - 2015-04-30
|
26
|
-
|
27
29
|
### Added
|
28
30
|
- initial release
|
29
31
|
|
32
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.1.0...HEAD
|
33
|
+
[0.1.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.0.4...0.1.0
|
34
|
+
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.0.3...0.0.4
|
35
|
+
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.0.2...0.0.3
|
36
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper)
|
6
6
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper)
|
7
7
|
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-zookeeper.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-zookeeper)
|
8
|
-
[ ![Codeship Status for sensu-plugins/sensu-plugins-zookeeper](https://codeship.com/projects/98cfbff0-e201-0132-51cf-3642858bbef8/status?branch=master)](https://codeship.com/projects/81353)
|
9
8
|
|
10
9
|
## Functionality
|
11
10
|
|
@@ -0,0 +1,70 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
#
|
4
|
+
# check-zookeeper-ruok
|
5
|
+
#
|
6
|
+
# DESCRIPTION:
|
7
|
+
# Check if Zookeeper node responds to 'ruok' query succesfully.
|
8
|
+
#
|
9
|
+
# 'ruok' is a ZooKeeper four letter word command (short for Are You Okay?)
|
10
|
+
# Specifically ruok tests if the server is running in a non-error state.
|
11
|
+
# The server will respond with imok if it is running. Otherwise it will
|
12
|
+
# not respond at all.
|
13
|
+
#
|
14
|
+
# PLATFORMS:
|
15
|
+
# All
|
16
|
+
#
|
17
|
+
# DEPENDENCIES:
|
18
|
+
# gem: sensu-plugin
|
19
|
+
#
|
20
|
+
# USAGE:
|
21
|
+
# Check if a node has Zookeeper running and responds with imok.
|
22
|
+
# ./check-zookeeeper-ruok.rb # Equivalent to examples below
|
23
|
+
# ./check-zookeeeper-ruok.rb -s localhost -p 2181
|
24
|
+
# ./check-zookeeeper-ruok.rb --server localhost --port 2181
|
25
|
+
#
|
26
|
+
# LICENCE:
|
27
|
+
# Phil Grayson <phil@philgrayson.com>
|
28
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
29
|
+
# for details.
|
30
|
+
#
|
31
|
+
|
32
|
+
require 'sensu-plugin/check/cli'
|
33
|
+
require 'socket'
|
34
|
+
|
35
|
+
class CheckZookeeperRUOK < Sensu::Plugin::Check::CLI
|
36
|
+
option :server,
|
37
|
+
description: 'Zookeeper hostname to connect to.',
|
38
|
+
short: '-s HOSTNAME',
|
39
|
+
long: '--server HOSTNAME',
|
40
|
+
default: 'localhost'
|
41
|
+
|
42
|
+
option :port,
|
43
|
+
description: 'Zookeeper port to connect to.',
|
44
|
+
short: '-p PORT',
|
45
|
+
long: '--port PORT',
|
46
|
+
default: 2181
|
47
|
+
|
48
|
+
option :timeout,
|
49
|
+
description: 'How long to wait for a reply in seconds.',
|
50
|
+
short: '-t SECS',
|
51
|
+
long: '--timeout SECS',
|
52
|
+
proc: proc(&:to_i),
|
53
|
+
default: 5
|
54
|
+
|
55
|
+
def run
|
56
|
+
TCPSocket.open(config[:server], config[:port]) do |socket|
|
57
|
+
socket.write 'ruok'
|
58
|
+
ready = IO.select([socket], nil, nil, config[:timeout])
|
59
|
+
|
60
|
+
if ready.nil?
|
61
|
+
critical %(Zookeeper did not respond to 'ruok' within #{config[:timeout]} seconds)
|
62
|
+
end
|
63
|
+
|
64
|
+
result = ready.first.first.read.chomp
|
65
|
+
|
66
|
+
ok 'Zookeeper reports no errors' if result == 'imok'
|
67
|
+
critical %(Zookeeper returned a non okay message: '#{result}')
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
metadata
CHANGED
@@ -1,51 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-zookeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
|
14
|
-
am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW
|
15
|
-
A2NvbTAeFw0xNTAxMjgyM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u
|
30
|
-
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
31
|
-
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
32
|
-
-----END CERTIFICATE-----
|
33
|
-
date: 2015-12-10 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-03-05 00:00:00.000000000 Z
|
34
12
|
dependencies:
|
35
13
|
- !ruby/object:Gem::Dependency
|
36
14
|
name: sensu-plugin
|
37
15
|
requirement: !ruby/object:Gem::Requirement
|
38
16
|
requirements:
|
39
|
-
- -
|
17
|
+
- - ~>
|
40
18
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.2
|
19
|
+
version: '1.2'
|
42
20
|
type: :runtime
|
43
21
|
prerelease: false
|
44
22
|
version_requirements: !ruby/object:Gem::Requirement
|
45
23
|
requirements:
|
46
|
-
- -
|
24
|
+
- - ~>
|
47
25
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.2
|
26
|
+
version: '1.2'
|
49
27
|
- !ruby/object:Gem::Dependency
|
50
28
|
name: zookeeper
|
51
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,136 +39,137 @@ dependencies:
|
|
61
39
|
- !ruby/object:Gem::Version
|
62
40
|
version: 1.4.11
|
63
41
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
42
|
+
name: bundler
|
65
43
|
requirement: !ruby/object:Gem::Requirement
|
66
44
|
requirements:
|
67
|
-
- -
|
45
|
+
- - ~>
|
68
46
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
47
|
+
version: '1.7'
|
70
48
|
type: :development
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
51
|
requirements:
|
74
|
-
- -
|
52
|
+
- - ~>
|
75
53
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
54
|
+
version: '1.7'
|
77
55
|
- !ruby/object:Gem::Dependency
|
78
|
-
name:
|
56
|
+
name: codeclimate-test-reporter
|
79
57
|
requirement: !ruby/object:Gem::Requirement
|
80
58
|
requirements:
|
81
|
-
- -
|
59
|
+
- - ~>
|
82
60
|
- !ruby/object:Gem::Version
|
83
|
-
version: 0.
|
61
|
+
version: '0.4'
|
84
62
|
type: :development
|
85
63
|
prerelease: false
|
86
64
|
version_requirements: !ruby/object:Gem::Requirement
|
87
65
|
requirements:
|
88
|
-
- -
|
66
|
+
- - ~>
|
89
67
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.
|
68
|
+
version: '0.4'
|
91
69
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
70
|
+
name: github-markup
|
93
71
|
requirement: !ruby/object:Gem::Requirement
|
94
72
|
requirements:
|
95
|
-
- -
|
73
|
+
- - ~>
|
96
74
|
- !ruby/object:Gem::Version
|
97
|
-
version: '3
|
75
|
+
version: '1.3'
|
98
76
|
type: :development
|
99
77
|
prerelease: false
|
100
78
|
version_requirements: !ruby/object:Gem::Requirement
|
101
79
|
requirements:
|
102
|
-
- -
|
80
|
+
- - ~>
|
103
81
|
- !ruby/object:Gem::Version
|
104
|
-
version: '3
|
82
|
+
version: '1.3'
|
105
83
|
- !ruby/object:Gem::Dependency
|
106
|
-
name:
|
84
|
+
name: pry
|
107
85
|
requirement: !ruby/object:Gem::Requirement
|
108
86
|
requirements:
|
109
|
-
- -
|
87
|
+
- - ~>
|
110
88
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
89
|
+
version: '0.10'
|
112
90
|
type: :development
|
113
91
|
prerelease: false
|
114
92
|
version_requirements: !ruby/object:Gem::Requirement
|
115
93
|
requirements:
|
116
|
-
- -
|
94
|
+
- - ~>
|
117
95
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
96
|
+
version: '0.10'
|
119
97
|
- !ruby/object:Gem::Dependency
|
120
98
|
name: rake
|
121
99
|
requirement: !ruby/object:Gem::Requirement
|
122
100
|
requirements:
|
123
|
-
- -
|
101
|
+
- - ~>
|
124
102
|
- !ruby/object:Gem::Version
|
125
|
-
version: '10.
|
103
|
+
version: '10.5'
|
126
104
|
type: :development
|
127
105
|
prerelease: false
|
128
106
|
version_requirements: !ruby/object:Gem::Requirement
|
129
107
|
requirements:
|
130
|
-
- -
|
108
|
+
- - ~>
|
131
109
|
- !ruby/object:Gem::Version
|
132
|
-
version: '10.
|
110
|
+
version: '10.5'
|
133
111
|
- !ruby/object:Gem::Dependency
|
134
|
-
name:
|
112
|
+
name: redcarpet
|
135
113
|
requirement: !ruby/object:Gem::Requirement
|
136
114
|
requirements:
|
137
|
-
- -
|
115
|
+
- - ~>
|
138
116
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
117
|
+
version: '3.2'
|
140
118
|
type: :development
|
141
119
|
prerelease: false
|
142
120
|
version_requirements: !ruby/object:Gem::Requirement
|
143
121
|
requirements:
|
144
|
-
- -
|
122
|
+
- - ~>
|
145
123
|
- !ruby/object:Gem::Version
|
146
|
-
version: '
|
124
|
+
version: '3.2'
|
147
125
|
- !ruby/object:Gem::Dependency
|
148
|
-
name:
|
126
|
+
name: rubocop
|
149
127
|
requirement: !ruby/object:Gem::Requirement
|
150
128
|
requirements:
|
151
|
-
- -
|
129
|
+
- - ~>
|
152
130
|
- !ruby/object:Gem::Version
|
153
|
-
version: '
|
131
|
+
version: '0.37'
|
154
132
|
type: :development
|
155
133
|
prerelease: false
|
156
134
|
version_requirements: !ruby/object:Gem::Requirement
|
157
135
|
requirements:
|
158
|
-
- -
|
136
|
+
- - ~>
|
159
137
|
- !ruby/object:Gem::Version
|
160
|
-
version: '
|
138
|
+
version: '0.37'
|
161
139
|
- !ruby/object:Gem::Dependency
|
162
|
-
name:
|
140
|
+
name: rspec
|
163
141
|
requirement: !ruby/object:Gem::Requirement
|
164
142
|
requirements:
|
165
|
-
- -
|
143
|
+
- - ~>
|
166
144
|
- !ruby/object:Gem::Version
|
167
|
-
version: '
|
145
|
+
version: '3.4'
|
168
146
|
type: :development
|
169
147
|
prerelease: false
|
170
148
|
version_requirements: !ruby/object:Gem::Requirement
|
171
149
|
requirements:
|
172
|
-
- -
|
150
|
+
- - ~>
|
173
151
|
- !ruby/object:Gem::Version
|
174
|
-
version: '
|
152
|
+
version: '3.4'
|
175
153
|
- !ruby/object:Gem::Dependency
|
176
|
-
name:
|
154
|
+
name: yard
|
177
155
|
requirement: !ruby/object:Gem::Requirement
|
178
156
|
requirements:
|
179
|
-
- -
|
157
|
+
- - ~>
|
180
158
|
- !ruby/object:Gem::Version
|
181
|
-
version: '0.
|
159
|
+
version: '0.8'
|
182
160
|
type: :development
|
183
161
|
prerelease: false
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
185
163
|
requirements:
|
186
|
-
- -
|
164
|
+
- - ~>
|
187
165
|
- !ruby/object:Gem::Version
|
188
|
-
version: '0.
|
166
|
+
version: '0.8'
|
189
167
|
description: Zookeeper plugins for checks and metrics
|
190
|
-
email:
|
168
|
+
email: <sensu-users@googlegroups.com>
|
191
169
|
executables:
|
192
|
-
- metrics-zookeeper.rb
|
193
170
|
- check-znode.rb
|
171
|
+
- check-zookeeper-ruok.rb
|
172
|
+
- metrics-zookeeper.rb
|
194
173
|
extensions: []
|
195
174
|
extra_rdoc_files: []
|
196
175
|
files:
|
@@ -198,6 +177,7 @@ files:
|
|
198
177
|
- LICENSE
|
199
178
|
- README.md
|
200
179
|
- bin/check-znode.rb
|
180
|
+
- bin/check-zookeeper-ruok.rb
|
201
181
|
- bin/metrics-zookeeper.rb
|
202
182
|
- lib/sensu-plugins-zookeeper.rb
|
203
183
|
- lib/sensu-plugins-zookeeper/version.rb
|
@@ -215,17 +195,17 @@ require_paths:
|
|
215
195
|
- lib
|
216
196
|
required_ruby_version: !ruby/object:Gem::Requirement
|
217
197
|
requirements:
|
218
|
-
- -
|
198
|
+
- - ! '>='
|
219
199
|
- !ruby/object:Gem::Version
|
220
200
|
version: 1.9.3
|
221
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
202
|
requirements:
|
223
|
-
- -
|
203
|
+
- - ! '>='
|
224
204
|
- !ruby/object:Gem::Version
|
225
205
|
version: '0'
|
226
206
|
requirements: []
|
227
207
|
rubyforge_project:
|
228
|
-
rubygems_version: 2.4.
|
208
|
+
rubygems_version: 2.4.5
|
229
209
|
signing_key:
|
230
210
|
specification_version: 4
|
231
211
|
summary: Sensu plugins for zookeeper
|
checksums.yaml.gz.sig
DELETED
data.tar.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
��u�*zI���k��?4.�������^�sXې����f��W #0ס|���?�s��5���*/�2=�����7���yR(�^5�X&b����r���{}&�Wp�3�K���`4�YT�j��Oe���5�l��N�,tJ��ջb�Ԧ�j��|���V��n����k�0� �+C]z<rs�H3��5��VbF�J��.���d�F���ˎy�"��Ƈ���O��s�!��o�=:
|
metadata.gz.sig
DELETED
Binary file
|