sensu-plugins-rabbitmq 3.2.0 → 3.3.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-rabbitmq-consumers.rb +15 -3
- data/lib/sensu-plugins-rabbitmq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40b573a0f4773062128ed437a39576e788bacaa4
|
4
|
+
data.tar.gz: 9dff2b208732607d97c71336fefd97b6cc62c26f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 936041662c088f8550408d06a77122052cebd9b3d01063dc9d5884670e79568892f4fa68313db16ca1be40906618df0f55e5dda1d54d2886e7af7e731100ad0f
|
7
|
+
data.tar.gz: f27b523247e059743620704494925be4c0d820e46b2ae2504a57b30de2ba321f1391785ec0f4178465633cf0c6b67f0521cbc4c876e46ede0d7480951ce65f08
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,16 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [3.3.0] - 2017-08-20
|
9
|
+
### Added
|
10
|
+
- check-rabbitmq-consumers.rb: Added ability to select queues with regular expressions. (@jtduby)
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- ruby 2.4 support (@majormoses)
|
14
|
+
|
15
|
+
### Fixed
|
16
|
+
- PR template spelling (@majormoses)
|
17
|
+
|
8
18
|
## [3.2.0] - 2017-06-20
|
9
19
|
### Added
|
10
20
|
- metrics-rabbitmq-exchange: new metrics for exchange, working similarly to queue metrics (@rthouvenin)
|
@@ -142,7 +152,8 @@ NOTE: this release changes the option flags in check-rabbitmq-node-health.rb to
|
|
142
152
|
- Remove copy paste errors in the Readme
|
143
153
|
- Removed Rubygems require Ruby 1.8.7 backwards compatibility from all plugins
|
144
154
|
|
145
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/3.
|
155
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/3.3.0...HEAD
|
156
|
+
[3.3.0]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/3.2.0...3.3.0
|
146
157
|
[3.2.0]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/3.1.1...3.2.0
|
147
158
|
[3.1.1]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/3.1.0...3.1.1
|
148
159
|
[3.1.0]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/3.0.0...3.1.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: UTF-8
|
3
|
-
|
3
|
+
|
4
4
|
# Check RabbitMQ consumers
|
5
5
|
# ===
|
6
6
|
#
|
@@ -65,6 +65,12 @@ class CheckRabbitMQConsumers < Sensu::Plugin::Check::CLI
|
|
65
65
|
long: '--exclude queue_name',
|
66
66
|
proc: proc { |q| q.split(',') }
|
67
67
|
|
68
|
+
option :regex,
|
69
|
+
description: 'Treat the --queue flag as a regular expression.',
|
70
|
+
long: '--regex',
|
71
|
+
boolean: true,
|
72
|
+
default: false
|
73
|
+
|
68
74
|
option :warn,
|
69
75
|
short: '-w NUM_CONSUMERS',
|
70
76
|
long: '--warn NUM_CONSUMERS',
|
@@ -124,7 +130,11 @@ class CheckRabbitMQConsumers < Sensu::Plugin::Check::CLI
|
|
124
130
|
|
125
131
|
def run
|
126
132
|
# create arrays to hold failures
|
127
|
-
missing = config[:
|
133
|
+
missing = if config[:regex]
|
134
|
+
[]
|
135
|
+
else
|
136
|
+
config[:queue] || []
|
137
|
+
end
|
128
138
|
critical = []
|
129
139
|
warn = []
|
130
140
|
|
@@ -132,7 +142,9 @@ class CheckRabbitMQConsumers < Sensu::Plugin::Check::CLI
|
|
132
142
|
rabbit.queues.each do |queue|
|
133
143
|
# if specific queues were passed only monitor those.
|
134
144
|
# if specific queues to exclude were passed then skip those
|
135
|
-
if config[:
|
145
|
+
if config[:regex]
|
146
|
+
next unless queue['name'] =~ /#{config[:queue].first}/
|
147
|
+
elsif config[:queue]
|
136
148
|
next unless config[:queue].include?(queue['name'])
|
137
149
|
elsif config[:exclude]
|
138
150
|
next if config[:exclude].include?(queue['name'])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-rabbitmq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.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: 2017-
|
11
|
+
date: 2017-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|