riemann-tools 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/bin/riemann-rabbitmq +6 -1
  2. metadata +1 -1
data/bin/riemann-rabbitmq CHANGED
@@ -17,6 +17,7 @@ class Riemann::Tools::Rabbitmq
17
17
  opt :monitor_pass, 'RabbitMQ monitoring user password', type: :string
18
18
  opt :monitor_port, 'RabbitMQ monitoring port', type: :int, default: 15672
19
19
  opt :monitor_host, 'RabbitMQ monitoring host', type: :string, default: "localhost"
20
+ opt :monitor_use_tls, 'RabbitMQ use tls', type: :bool, default: false
20
21
 
21
22
  opt :max_queue_size, "max number of items in a queue that is acceptable", type: :int, default: 1_000_000
22
23
  opt :ignore_max_size_queues, "A regular expression to match queues that shouldn't be size-checked", type: :string
@@ -24,7 +25,11 @@ class Riemann::Tools::Rabbitmq
24
25
  opt :node, "Specify a node to monitor", type: :strings
25
26
 
26
27
  def base_url
27
- "http://#{options[:monitor_user]}:#{options[:monitor_pass]}@#{options[:monitor_host]}:#{options[:monitor_port]}/api"
28
+ protocol = "http"
29
+ if (options[:monitor_use_tls]) && (options[:monitor_use_tls]==true)
30
+ protocol = "https"
31
+ end
32
+ "#{protocol}://#{options[:monitor_user]}:#{options[:monitor_pass]}@#{options[:monitor_host]}:#{options[:monitor_port]}/api"
28
33
  end
29
34
 
30
35
  def overview_url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: