Skip to content

Commit 3dbccb1

Browse files
author
Jef Spaleta
authored
Merge pull request #31 from sensu-plugins/release/3.0.0
Release/3.0.0
2 parents 688c3fb + d36b246 commit 3dbccb1

File tree

6 files changed

+187
-11
lines changed

6 files changed

+187
-11
lines changed

.bonsai.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
description: "#{repo}"
3+
builds:
4+
- platform: "alpine"
5+
arch: "amd64"
6+
asset_filename: "#{repo}_#{version}_alpine_linux_amd64.tar.gz"
7+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
8+
filter:
9+
- "entity.system.os == 'linux'"
10+
- "entity.system.arch == 'amd64'"
11+
- "entity.system.platform == 'alpine'"
12+
- "entity.system.platform_version.split('.')[0] == '3'"
13+
- platform: "alpine3.8"
14+
arch: "amd64"
15+
asset_filename: "#{repo}_#{version}_alpine3.8_linux_amd64.tar.gz"
16+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
17+
filter:
18+
- "entity.system.os == 'linux'"
19+
- "entity.system.arch == 'amd64'"
20+
- "entity.system.platform == 'alpine'"
21+
- platform: "centos6"
22+
arch: "amd64"
23+
asset_filename: "#{repo}_#{version}_centos6_linux_amd64.tar.gz"
24+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
25+
filter:
26+
- "entity.system.os == 'linux'"
27+
- "entity.system.arch == 'amd64'"
28+
- "entity.system.platform_family == 'rhel'"
29+
- "entity.system.platform_version.split('.')[0] == '6'"
30+
- platform: "centos7"
31+
arch: "amd64"
32+
asset_filename: "#{repo}_#{version}_centos7_linux_amd64.tar.gz"
33+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
34+
filter:
35+
- "entity.system.os == 'linux'"
36+
- "entity.system.arch == 'amd64'"
37+
- "entity.system.platform_family == 'rhel'"
38+
- "entity.system.platform_version.split('.')[0] == '7'"
39+
- platform: "debian"
40+
arch: "amd64"
41+
asset_filename: "#{repo}_#{version}_debian_linux_amd64.tar.gz"
42+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
43+
filter:
44+
- "entity.system.os == 'linux'"
45+
- "entity.system.arch == 'amd64'"
46+
- "entity.system.platform_family == 'debian'"
47+
- platform: "debian9"
48+
arch: "amd64"
49+
asset_filename: "#{repo}_#{version}_debian9_linux_amd64.tar.gz"
50+
sha_filename: "#{repo}_#{version}_sha512-checksums.txt"
51+
filter:
52+
- "entity.system.os == 'linux'"
53+
- "entity.system.arch == 'amd64'"
54+
- "entity.system.platform_family == 'debian'"
55+
- "entity.system.platform_version.split('.')[0] == '9'"
56+

.travis.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ cache:
44
install:
55
- bundle install
66
rvm:
7-
- 2.1
8-
- 2.2
97
- 2.3.0
108
- 2.4.1
119
notifications:
@@ -18,16 +16,24 @@ script:
1816
- bundle exec rake default
1917
- gem build sensu-plugins-zookeeper.gemspec
2018
- gem install sensu-plugins-zookeeper-*.gem
19+
before_deploy:
20+
- bash -c "[ ! -d bonsai/ ] && git clone https://github.com/sensu/sensu-go-bonsai-asset.git bonsai || echo 'bonsai/ exists, skipping git clone'"
21+
2122
deploy:
22-
provider: rubygems
23+
- provider: rubygems
2324
api_key:
2425
secure: Mswd19ZpQU0RqJEy2GnyDWTNgd9QCFYuN1q8bqs2U7lHpXARhLI+WDdCCfiyfiMQHxxOyrRLsra12DcREyaOQocQk2rGnlIEfu6GxmRytjyB8MLvowUgWun2D5Rxe4nvXeB5DSReZQMr0K2hm24FmMaUtBSu9N4rnciEn2EgCNM=
2526
gem: sensu-plugins-zookeeper
2627
on:
2728
tags: true
2829
all_branches: true
29-
rvm: 2.1
30-
rvm: 2.2
31-
rvm: 2.3.0
3230
rvm: 2.4.1
3331
repo: sensu-plugins/sensu-plugins-zookeeper
32+
- provider: script
33+
script: bonsai/ruby-runtime/travis-build-ruby-plugin-assets.sh sensu-plugins-zookeeper
34+
skip_cleanup: true
35+
on:
36+
tags: true
37+
all_branches: true
38+
rvm: 2.4.1
39+

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
66

77
## [Unreleased]
88

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+
926
## [2.0.0] - 2018-01-18
1027
### Security
1128
- 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/)
8198
### Added
8299
- initial release
83100

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
85103
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/1.5.0...2.0.0
86104
[1.5.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/1.4.0...1.5.0
87105
[1.4.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/1.3.0...1.4.0

README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper)
66
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper)
77
[![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).
812

913
## Functionality
1014

@@ -22,6 +26,98 @@
2226
* metrics-zookeeper-cluster.rb - Gather metrics from An Exhibitor run Zookeeper cluster
2327

2428
## 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+
```
25121

26122
## Installation
27123

lib/sensu-plugins-zookeeper/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module SensuPluginsZookeeper
22
module Version
3-
MAJOR = 2
3+
MAJOR = 3
44
MINOR = 0
55
PATCH = 0
66

sensu-plugins-zookeeper.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
2121
s.platform = Gem::Platform::RUBY
2222
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
2323
s.require_paths = ['lib']
24-
s.required_ruby_version = '>= 2.1.0'
24+
s.required_ruby_version = '>= 2.3.0'
2525

2626
s.summary = 'Sensu plugins for zookeeper'
2727
s.test_files = s.files.grep(%r{^(test|spec|features)/})
2828
s.version = SensuPluginsZookeeper::Version::VER_STRING
2929

30-
s.add_runtime_dependency 'sensu-plugin', '~> 1.2'
30+
s.add_runtime_dependency 'sensu-plugin', '~> 4.0'
3131
s.add_runtime_dependency 'zookeeper', '1.4.11'
3232

33-
s.add_development_dependency 'bundler', '~> 1.7'
33+
s.add_development_dependency 'bundler', '~> 2.1'
3434
s.add_development_dependency 'codeclimate-test-reporter', '~> 1.0'
3535
s.add_development_dependency 'github-markup', '~> 3.0'
3636
s.add_development_dependency 'pry', '~> 0.10'

0 commit comments

Comments
 (0)