sensu-plugins-kafka 0.11.0 → 0.12.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 814e07a1f689f1395bbfec4be50c21d21dc8fdd9
4
- data.tar.gz: 67c167b2a761d5ec26328889d3f7265ca5eb04c1
2
+ SHA256:
3
+ metadata.gz: 61da93cccbe78d95d745c283ddd15816e0545d1c014ad7e9ad51c8afe01c915c
4
+ data.tar.gz: a1afeb8db6d9dc74abc4f508243fc3cd542b78583d5888a34854ef4f14b1bd55
5
5
  SHA512:
6
- metadata.gz: e48d74364f25dd211615a314a2c1190b757229d80417943364a40022fb865dd0c677718f5648af449eb0b05f0df3531b94efd7c6499e810894df10efd2422f47
7
- data.tar.gz: 7ca2f1ff7b776619702f2e5728fd3a34a0aa018df8ecd098a82fd124accea6cba11bd9bee42a3f38e0f460c5e3e3f10c89e71da517574f2add2d2940c1e8822c
6
+ metadata.gz: 762b6a3cfc87ec2bfe5591ad476e0cf03d39085bd284b845ca94b52d50e10667459c7173feb232926c060882f91ac9bf33a8d160eecb83d8526f6b6a4ca0aa03
7
+ data.tar.gz: f991a1c910ddf4a5223abbb81a33001733c6eac6e473763dd790fc6ede0163c3e3307bc64a734acf86aa98f4dc64938a9760c667c274ddda9c57032186bfe8e9
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/obazoud/sensu-plugins-kafka.svg?branch=master)](https://travis-ci.org/obazoud/sensu-plugins-kafka) [![Gem Version](https://badge.fury.io/rb/sensu-plugins-kafka.svg)](https://badge.fury.io/rb/sensu-plugins-kafka)
4
4
 
5
+ ## Community Status
6
+
7
+ This plugin is not officially supporting this plugin please see https://github.com/sensu-plugins/sensu-plugins-kafka for the officially maintained community plugin.
8
+
5
9
  ## Functionality
6
10
 
7
11
  **check-consumer-lag.rb**
@@ -0,0 +1,65 @@
1
+ #! /usr/bin/env ruby
2
+ #
3
+ # check-broker
4
+ #
5
+ # DESCRIPTION:
6
+ # This plugin checks broker properties.
7
+ #
8
+ # OUTPUT:
9
+ # plain-text
10
+ #
11
+ # PLATFORMS:
12
+ # Linux
13
+ #
14
+ # DEPENDENCIES:
15
+ # gem: sensu-plugin
16
+ # gem: zookeeper
17
+ #
18
+ # USAGE:
19
+ # ./check-broker
20
+ #
21
+ # NOTES:
22
+ #
23
+ # LICENSE:
24
+ # Olivier Bazoud
25
+ # Released under the same terms as Sensu (the MIT license); see LICENSE
26
+ # for details.
27
+ #
28
+
29
+ require 'sensu-plugin/check/cli'
30
+ require 'zookeeper'
31
+
32
+ class BrokerCheck < Sensu::Plugin::Check::CLI
33
+ option :zookeeper,
34
+ description: 'ZooKeeper connect string (host:port,..)',
35
+ short: '-z ZOOKEEPER',
36
+ long: '--zookeeper ZOOKEEPER',
37
+ default: 'localhost:2181',
38
+ required: true
39
+
40
+ option :ids,
41
+ description: 'Brokers ids',
42
+ short: '-n IDS',
43
+ long: '--name IDS',
44
+ proc: proc { |a| a.split(',') },
45
+ required: true
46
+
47
+ option :size,
48
+ description: 'Broker size',
49
+ short: '-s BROKER_SIZE',
50
+ long: '--broker-size BROKER_SIZE',
51
+ proc: proc(&:to_i)
52
+ def run
53
+ z = Zookeeper.new(config[:zookeeper])
54
+
55
+ brokers = z.get_children(path: '/brokers/ids')[:children]
56
+
57
+ critical "Broker '#{config[:ids] - brokers}' not found" unless (config[:ids] - brokers).length == 0
58
+ critical "Broker wrong size: #{brokers.length} (#{brokers}), expection #{config[:size]}" unless brokers.length == config[:size]
59
+
60
+ ok
61
+ rescue => e
62
+ puts "Error: #{e.backtrace}"
63
+ critical "Error: #{e}"
64
+ end
65
+ end
@@ -5,7 +5,7 @@ module SensuPluginsKafka
5
5
  # This defines the version of the gem
6
6
  module Version
7
7
  MAJOR = 0
8
- MINOR = 11
8
+ MINOR = 12
9
9
  PATCH = 0
10
10
 
11
11
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
- - Sensu-Plugins and contributors
7
+ - Olivier Bazoud and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - certs/sensu-plugins.pem
12
- date: 2017-02-17 00:00:00.000000000 Z
12
+ date: 2018-12-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: poseidon
@@ -73,14 +73,14 @@ dependencies:
73
73
  requirements:
74
74
  - - '='
75
75
  - !ruby/object:Gem::Version
76
- version: 0.32.1
76
+ version: 0.49.0
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - '='
82
82
  - !ruby/object:Gem::Version
83
- version: 0.32.1
83
+ version: 0.49.0
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rspec
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -157,14 +157,14 @@ dependencies:
157
157
  requirements:
158
158
  - - "~>"
159
159
  - !ruby/object:Gem::Version
160
- version: '0.8'
160
+ version: 0.9.11
161
161
  type: :development
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - "~>"
166
166
  - !ruby/object:Gem::Version
167
- version: '0.8'
167
+ version: 0.9.11
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: pry
170
170
  requirement: !ruby/object:Gem::Requirement
@@ -179,11 +179,12 @@ dependencies:
179
179
  - - "~>"
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0.10'
182
- description: Sensu plugins for Kafka
183
- email: "<sensu-users@googlegroups.com>"
182
+ description: Non Community Sensu plugins for Kafka
183
+ email: olivier.bazoud@gmail.com
184
184
  executables:
185
185
  - check-consumer-lag.rb
186
186
  - check-topic.rb
187
+ - check-broker.rb
187
188
  - check-topics-name.rb
188
189
  - metrics-consumer.rb
189
190
  extensions: []
@@ -192,13 +193,14 @@ files:
192
193
  - CHANGELOG.md
193
194
  - LICENSE
194
195
  - README.md
196
+ - bin/check-broker.rb
195
197
  - bin/check-consumer-lag.rb
196
198
  - bin/check-topic.rb
197
199
  - bin/check-topics-name.rb
198
200
  - bin/metrics-consumer.rb
199
201
  - lib/sensu-plugins-kafka.rb
200
202
  - lib/sensu-plugins-kafka/version.rb
201
- homepage: https://github.com/sensu-plugins/sensu-plugins-kafka
203
+ homepage: https://github.com/obazoud/sensu-plugins-kafka
202
204
  licenses:
203
205
  - MIT
204
206
  metadata:
@@ -223,8 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
225
  - !ruby/object:Gem::Version
224
226
  version: '0'
225
227
  requirements: []
226
- rubyforge_project:
227
- rubygems_version: 2.4.5
228
+ rubygems_version: 3.0.1
228
229
  signing_key:
229
230
  specification_version: 4
230
231
  summary: Sensu plugins for Kafka