sensu-plugins-rabbitmq 1.2.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yzg5YjVhMTQzMDhjZDQwYzU0NTZjMDU2YjdhNTZjYTAzYTY1NzM2NQ==
4
+ Y2E4YmQyOTI5YjI5YzMwNTRkOTA1MmU4YWQ1ZTliNzdlNjVhM2RkNQ==
5
5
  data.tar.gz: !binary |-
6
- MWYzMDVjYWI0YjkyYmNjOWJlNDZkMjliOTdhMGM2NTUxZWUwZjgwOA==
6
+ MzAwMWYyY2MxZDExZTQ0ZjQ1OTFmZDBkMTk1ZDg1MmI1MjE2MmFiMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGVlYmZjYTliZDI1ZWEwZjM2MzI1MTZlOGY2ZjY4MTBhNTIzNmIzMmVjZmUw
10
- OGU3MGUxMmUyZmQzYjVlMDc3MzlmZWI0ZDcyZWNkNjM3NmZhM2EwYTRhNGU5
11
- YTcyMzUxODgwMjc1ZTRiNjNkNTMzMTFkMjAyZGFhODk2OGZjYTY=
9
+ MmExNWE1ZDg1NTEwNjYzNGYyNDUyZmM0Mzc5NjczYTJkNTMxYTcwMDdkODdk
10
+ ZmRiN2QwNjFjZTIwMDYzNjA2YzE3NWNlNmY5ZTlmMjc0NWQ4ODU2YTFlNGNk
11
+ NWQwNzM1OTEzY2ViYWNmYmY4MjZmYjg4MzE1ODBjOWMyMGZiMzk=
12
12
  data.tar.gz: !binary |-
13
- OGIwYTNjMDU3NDg2MTM1ZDUzM2U3ZGZmOWIzOWQwOTYyODNhYmQxZDM0MTgz
14
- NzQwOGFlNzYyNTI2MjY0YTdlZTM2OTI4MTUyYzJjOWY1NGZjZjUzN2IyNjIw
15
- NzJiNGViYTU3N2VlOGZiMjBiMGY1NTBlYzEwNjMxMTA5MDY5ODQ=
13
+ MmNhNDdjODhmOTIyZWJmODExZTQwYjg3NWE2ZTFhZjY1NGRiZTJiMWU5NTVl
14
+ ZTczMGIyMjIzYTgxMjI3ZmQwYmVhMTc0MTg3MTk3MDFkNjE5YmM1N2E0MDI3
15
+ NzFiN2U5NTE5MTZiMWM3ZWNkNWQwZTRjMWEzZDE4YmIwMGJhNTY=
@@ -5,9 +5,16 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.3.0] - 2016-04-13
9
+ ### Added
10
+ - check-rabbitmq-cluster-health.rb: Added option to provide SSL CA certificate
11
+
12
+ ### Changed
13
+ - set dep on sensu-plugin gem to be more relaxed
14
+
8
15
  ## [1.2.0] - 2016-04-13
9
16
  ### Added
10
- - check-rabbitmq-amqp-alive.rb: Added support for TLS authentication
17
+ - check-rabbitmq-amqp-alive.rb: Added support for TLS authentication
11
18
  - metrics-rabbitmq-queue.rb: Added option to filter vhost with regular expression
12
19
  - Added option to skip SSL cert checking
13
20
 
@@ -78,7 +85,8 @@ NOTE: this release changes the option flags in check-rabbitmq-node-health.rb to
78
85
  - Remove copy paste errors in the Readme
79
86
  - Removed Rubygems require Ruby 1.8.7 backwards compatibility from all plugins
80
87
 
81
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/1.2.0...HEAD
88
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/1.3.0...HEAD
89
+ [1.3.0]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/1.2.0...1.3.0
82
90
  [1.2.0]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/1.1.0...1.2.0
83
91
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/1.0.0...1.1.0
84
92
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/compare/0.1.0...1.0.0
@@ -73,6 +73,11 @@ class CheckRabbitMQCluster < Sensu::Plugin::Check::CLI
73
73
  boolean: true,
74
74
  default: false
75
75
 
76
+ option :ssl_ca_file,
77
+ description: 'Path to SSL CA .crt',
78
+ long: '--ssl_ca_file CA_PATH',
79
+ default: ''
80
+
76
81
  def run
77
82
  res = cluster_healthy?
78
83
 
@@ -101,21 +106,27 @@ class CheckRabbitMQCluster < Sensu::Plugin::Check::CLI
101
106
  end
102
107
 
103
108
  def cluster_healthy?
104
- host = config[:host]
105
- port = config[:port]
106
- username = config[:username]
107
- password = config[:password]
108
- ssl = config[:ssl]
109
- verify_ssl = config[:verify_ssl_off]
110
- nodes = config[:nodes].split(',')
109
+ host = config[:host]
110
+ port = config[:port]
111
+ username = config[:username]
112
+ password = config[:password]
113
+ ssl = config[:ssl]
114
+ verify_ssl = config[:verify_ssl_off]
115
+ nodes = config[:nodes].split(',')
116
+ ssl_ca_file = config[:ssl_ca_file]
111
117
 
112
118
  begin
113
119
  url_prefix = ssl ? 'https' : 'http'
114
- resource = RestClient::Resource.new(
115
- "#{url_prefix}://#{host}:#{port}/api/nodes",
120
+ options = {
116
121
  user: username,
117
122
  password: password,
118
123
  verify_ssl: !verify_ssl
124
+ }
125
+ options[:ssl_ca_file] = ssl_ca_file unless ssl_ca_file.empty?
126
+
127
+ resource = RestClient::Resource.new(
128
+ "#{url_prefix}://#{host}:#{port}/api/nodes",
129
+ options
119
130
  )
120
131
  # create a hash of the server names and their running state
121
132
  servers_status = Hash[JSON.parse(resource.get).map { |server| [server['name'], server['running']] }]
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsRabbitMQ
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 2
5
- PATCH = 0
4
+ MINOR = 3
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.1
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: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2016-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.0
19
+ version: '1.2'
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.0
26
+ version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: carrot-top
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - ~>
186
186
  - !ruby/object:Gem::Version
187
- version: '0.37'
187
+ version: 0.40.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - ~>
193
193
  - !ruby/object:Gem::Version
194
- version: '0.37'
194
+ version: 0.40.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rspec
197
197
  requirement: !ruby/object:Gem::Requirement