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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3566139d4b9ef5dce00928ee03a851735572fb0
4
- data.tar.gz: 1e2b59c503c0e8fad702558068746944682500b5
3
+ metadata.gz: 40b573a0f4773062128ed437a39576e788bacaa4
4
+ data.tar.gz: 9dff2b208732607d97c71336fefd97b6cc62c26f
5
5
  SHA512:
6
- metadata.gz: 21f1f3fc7372c3e79b7241d6cb7fb7867b39822c75e57a11c807d559c00fb7a10e7e62a6f560fe7cbdd9c8c7c8799d386bb96ae0761ddad09d66b2c72cf43a59
7
- data.tar.gz: 66ee9067f134abc57fa81206f52adc7173b7f1190a792b90dc9155631601d522edf0a8fd899c921e5c07cc8500b0ff51d20358a804c7861e08ae7ea7d618a78c
6
+ metadata.gz: 936041662c088f8550408d06a77122052cebd9b3d01063dc9d5884670e79568892f4fa68313db16ca1be40906618df0f55e5dda1d54d2886e7af7e731100ad0f
7
+ data.tar.gz: f27b523247e059743620704494925be4c0d820e46b2ae2504a57b30de2ba321f1391785ec0f4178465633cf0c6b67f0521cbc4c876e46ede0d7480951ce65f08
@@ -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.2.0...HEAD
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[:queue] || []
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[:queue]
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'])
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsRabbitMQ
2
2
  module Version
3
3
  MAJOR = 3
4
- MINOR = 2
4
+ MINOR = 3
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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.2.0
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-06-21 00:00:00.000000000 Z
11
+ date: 2017-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin