sensu-plugins-zookeeper 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83daae1c3f6dd1333cd43fb1cc7f24fc94082afdce148565716797ab6626da66
4
- data.tar.gz: 8e05f1fce9a74cb6ce5872f0fe45cde1e3b879de0a0ef48d296f1c0086ddbdf9
3
+ metadata.gz: bfa8a78004fae9e11f38490aef5c5c8e09f3cc4a4b613b5099eb495e47805d0b
4
+ data.tar.gz: aa41d17de0b05b8487d52ac80e58094c77c725466b67dc74f7df2f232dc8b14b
5
5
  SHA512:
6
- metadata.gz: d3c15a4689b39624ebcdf8497dccc303d1be2c352628e1c41c1a1480bc58b256999ac1ac3a7f87e1cdb4ab893c7a06c5359bc22402400f4fe7719f36ae05ebdc
7
- data.tar.gz: 759023fede130b8c885f50238b3ef402cf2f050e0cd3da2579a0858e00a51fe570d3f13760a08e6de86e11d4b9e9ac2a891a4da48dca4debfdc27b4d0d9d3ace
6
+ metadata.gz: 9e93f3edf92996b15cf7a90f34228093b15b70dc06ba73b2b902fe638dad21f7d325fdb9636ccaf1aa79902d88ce58d68d7e5b1f0cb55caf8d8198104cd1861c
7
+ data.tar.gz: d486f4a0f8e405575db2116792f12aea2d7078ce9cc93cac3263ed38ae7b86458d087d65d24a59d652af5d404e1d7873e46c72e9074e73f08b6a4e756ed1253f
@@ -6,6 +6,23 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.0.0] - 2020-03-19
10
+ ### Breaking Changes
11
+ - 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)
12
+ - Make minimum supported ruby version 2.3.0
13
+
14
+ ### Added
15
+ - Bonsai Asset enablement. Making changes to travis config to enable Bonsai asset building during release deployment
16
+
17
+ ### Changes
18
+ - Update development dependency: bundler ~> 2.1
19
+ - Update development dependency: codeclimate-test-reporter ~> 1.0
20
+ - Update development_dependency: github-markup ~> 3.0
21
+ - Update development_dependency: rake ~> 12.3
22
+
23
+ ### Fixed
24
+ - Updated how zookeeper information is scraped to use string matching instead of positional matching to accomedate newer zookeeper releases adding additional attributes.
25
+
9
26
  ## [2.0.0] - 2018-01-18
10
27
  ### Security
11
28
  - updated rubocop dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@thomasriley)
@@ -81,7 +98,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
81
98
  ### Added
82
99
  - initial release
83
100
 
84
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/2.0.0...HEAD
101
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/3.0.0...HEAD
102
+ [3.0.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/2.0.0...3.0.0
85
103
  [2.0.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/1.5.0...2.0.0
86
104
  [1.5.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/1.4.0...1.5.0
87
105
  [1.4.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/1.3.0...1.4.0
data/README.md CHANGED
@@ -5,6 +5,10 @@
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
+ [![Sensu Bonsai Asset](https://img.shields.io/badge/Bonsai-Download%20Me-brightgreen.svg?colorB=89C967&logo=sensu)](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-zookeeper)
9
+
10
+ ## Sensu Asset
11
+ The Sensu assets packaged from this repository are built against the Sensu Ruby runtime environment. When using these assets as part of a Sensu Go resource (check, mutator or handler), make sure you include the corresponding Sensu Ruby runtime asset in the list of assets needed by the resource. The current ruby-runtime assets can be found [here](https://bonsai.sensu.io/assets/sensu/sensu-ruby-runtime) in the [Bonsai Asset Index](bonsai.sensu.io).
8
12
 
9
13
  ## Functionality
10
14
 
@@ -22,6 +26,98 @@
22
26
  * metrics-zookeeper-cluster.rb - Gather metrics from An Exhibitor run Zookeeper cluster
23
27
 
24
28
  ## Usage
29
+ ```
30
+ $ check-znode.rb --help
31
+ Usage: ./bin/check-znode.rb (options)
32
+ -v, --check_value REGEX Optionally check the znode value against a regex
33
+ -s, --servers zk-address zk address to connect to (required)
34
+ -z, --znode ZNODE znode to check (required)
35
+ ```
36
+
37
+ ```
38
+ $ check-zookeeper-file-descriptors.rb --help
39
+ Usage: ./bin/check-zookeeper-file-descriptors.rb (options)
40
+ -d DESCRIPTORS, Critical threshold for Zookeeper open files descriptors
41
+ --file-descriptors
42
+ -p, --port PORT Zookeeper port to connect to.
43
+ -s, --server HOSTNAME Zookeeper hostname to connect to.
44
+ -t, --timeout SECS How long to wait for a reply in seconds.
45
+
46
+ ```
47
+
48
+ ```
49
+ $ check-zookeeper-cluster.rb --help
50
+ Usage: ./bin/check-zookeeper-cluster.rb (options)
51
+ -c, --count count Zookeeper cluster node count
52
+ -e, --exhibitor status end point exhibitor end node for status checks
53
+ -l, --latency TICKS Critical threshold for Zookeeper average latency
54
+ -t, --timeout SECS How long to wait for a reply in seconds.
55
+ -p, --port port Zookeeper nodes' listen port
56
+
57
+ ```
58
+
59
+ ```
60
+ $ check-netty-zookeeper-cluster.rb --help
61
+ Usage: ./bin/check-netty-zookeeper-cluster.rb (options)
62
+ -c, --count count Zookeeper cluster follower count
63
+ -l, --latency TICKS Critical threshold for Zookeeper average latency
64
+ -p, --port port Zookeeper nodes' listen port
65
+
66
+ ```
67
+
68
+ ```
69
+ $ metrics-zookeeper.rb --help
70
+ Usage: ./bin/metrics-zookeeper.rb (options)
71
+ --host HOST ZooKeeper host
72
+ --port PORT ZooKeeper port
73
+ --scheme SCHEME Metric naming scheme, text to prepend to metrics
74
+
75
+ ```
76
+
77
+ ```
78
+ $ metrics-zookeeper-cluster.rb --help
79
+ Usage: ./bin/metrics-zookeeper-cluster.rb (options)
80
+ -e, --exhibitor status end point exhibitor end node for status checks
81
+ --scheme SCHEME Metric naming scheme, text to prepend to metrics
82
+ -p, --port port Zookeeper nodes' listen port
83
+
84
+ ```
85
+
86
+ ```
87
+ $ check-zookeeper-ruok.rb --help
88
+ Usage: ./bin/check-zookeeper-ruok.rb (options)
89
+ -p, --port PORT Zookeeper port to connect to.
90
+ -s, --server HOSTNAME Zookeeper hostname to connect to.
91
+ -t, --timeout SECS How long to wait for a reply in seconds.
92
+ ```
93
+
94
+ ```
95
+ $ check-zookeeper-reqs.rb --help
96
+ Usage: ./bin/check-zookeeper-reqs.rb (options)
97
+ -r, --reqs REQS Critical threshold for Zookeeper outstanding requests
98
+ -p, --port PORT Zookeeper port to connect to.
99
+ -s, --server HOSTNAME Zookeeper hostname to connect to.
100
+ -t, --timeout SECS How long to wait for a reply in seconds.
101
+ ```
102
+
103
+ ```
104
+ $ check-zookeeper-mode.rb --help
105
+ Usage check-zookeeper-mode.rb (options)
106
+ -m, --mode MODE Space separated expected modes. (required)
107
+ -p, --port PORT Zookeeper port to connect to.
108
+ -s, --server HOSTNAME Zookeeper hostname to connect to.
109
+ -t, --timeout SECS How long to wait for a reply in seconds.
110
+ ```
111
+
112
+ ```
113
+ $ check-zookeeper-latency.rb --help
114
+ Usage: ./bin/check-zookeeper-latency.rb (options)
115
+ -l, --latency TICKS Critical threshold for Zookeeper average latency
116
+ -p, --port PORT Zookeeper port to connect to.
117
+ -s, --server HOSTNAME Zookeeper hostname to connect to.
118
+ -t, --timeout SECS How long to wait for a reply in seconds.
119
+
120
+ ```
25
121
 
26
122
  ## Installation
27
123
 
@@ -70,7 +70,7 @@ class CheckZookeeperREQS < Sensu::Plugin::Check::CLI
70
70
  end
71
71
 
72
72
  result = ready.first.first.read.chomp.split("\n")
73
- avg_fd = (result[13].split("\t")[1].to_f / result[14].split("\t")[1].to_f)
73
+ avg_fd = (result.grep(/zk_open_file_descriptor_count/)[0].split("\t")[1].to_f / result.grep(/zk_max_file_descriptor_count/)[0].split("\t")[1].to_f)
74
74
 
75
75
  ok %(Zookeeper's open file descriptors rate is #{avg_fd}) if avg_fd < config[:fd_critical]
76
76
  critical %(Zookeeper's open file descriptors rate is #{avg_fd}, which is more than #{config[:fd_critical]} threshold)
@@ -67,7 +67,7 @@ class CheckZookeeperREQS < Sensu::Plugin::Check::CLI
67
67
  end
68
68
 
69
69
  result = ready.first.first.read.chomp.split("\n")
70
- avg_latency = result[1].split("\t")[1].to_i
70
+ avg_latency = result.grep(/zk_avg_latency/)[0].split("\t")[1].to_i
71
71
 
72
72
  ok %(Zookeeper has average latency #{avg_latency}) if avg_latency < config[:avg_latency_critical]
73
73
  critical %(Zookeeper's average latency is #{avg_latency}, which is more than #{config[:avg_latency_critical]} threshold)
@@ -70,7 +70,7 @@ class CheckZookeeperREQS < Sensu::Plugin::Check::CLI
70
70
  end
71
71
 
72
72
  result = ready.first.first.read.chomp.split("\n")
73
- out_reqs = result[7].split("\t")[1].to_i
73
+ out_reqs = result.grep(/zk_outstanding_requests/)[0].split("\t")[1].to_i
74
74
 
75
75
  ok %(Zookeeper has #{out_reqs} outstanding requests) if out_reqs < config[:out_reqs_critical]
76
76
  critical %(Zookeeper has #{out_reqs} outstanding requests, which is more than #{config[:out_reqs_critical]} threshold)
@@ -1,6 +1,6 @@
1
1
  module SensuPluginsZookeeper
2
2
  module Version
3
- MAJOR = 2
3
+ MAJOR = 3
4
4
  MINOR = 0
5
5
  PATCH = 0
6
6
 
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: 2.0.0
4
+ version: 3.0.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: 2018-01-19 00:00:00.000000000 Z
11
+ date: 2020-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.2'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: zookeeper
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,42 +44,42 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.7'
47
+ version: '2.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.7'
54
+ version: '2.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: codeclimate-test-reporter
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.4'
61
+ version: '1.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.4'
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: github-markup
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.3'
75
+ version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.3'
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '10.5'
103
+ version: '12.3'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '10.5'
110
+ version: '12.3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: redcarpet
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -167,16 +167,16 @@ dependencies:
167
167
  description: Zookeeper plugins for checks and metrics
168
168
  email: "<sensu-users@googlegroups.com>"
169
169
  executables:
170
- - check-netty-zookeeper-cluster.rb
171
- - check-znode.rb
172
- - check-zookeeper-cluster.rb
170
+ - metrics-zookeeper.rb
171
+ - check-zookeeper-mode.rb
173
172
  - check-zookeeper-file-descriptors.rb
173
+ - metrics-zookeeper-cluster.rb
174
+ - check-znode.rb
175
+ - check-zookeeper-ruok.rb
174
176
  - check-zookeeper-latency.rb
175
- - check-zookeeper-mode.rb
176
177
  - check-zookeeper-reqs.rb
177
- - check-zookeeper-ruok.rb
178
- - metrics-zookeeper-cluster.rb
179
- - metrics-zookeeper.rb
178
+ - check-netty-zookeeper-cluster.rb
179
+ - check-zookeeper-cluster.rb
180
180
  extensions: []
181
181
  extra_rdoc_files: []
182
182
  files:
@@ -211,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - ">="
213
213
  - !ruby/object:Gem::Version
214
- version: 2.1.0
214
+ version: 2.3.0
215
215
  required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  requirements:
217
217
  - - ">="
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  version: '0'
220
220
  requirements: []
221
221
  rubyforge_project:
222
- rubygems_version: 2.7.4
222
+ rubygems_version: 2.7.7
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Sensu plugins for zookeeper