Skip to content

Commit

Permalink
Add ssl_verify option to RabbitMQ template (#383)
Browse files Browse the repository at this point in the history
Fixes #382
  • Loading branch information
iancward authored and olivielpeau committed Dec 1, 2016
1 parent f76e688 commit c6ade18
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
16 changes: 9 additions & 7 deletions recipes/rabbitmq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
# If you are running multiple rabbitmq instances on the same machine
# list them all as hashes.
#
# node.datadog.rabbitmq.instances = [
# {
# "api_url" => "http://localhost:15672/api/",
# "user" => "guest",
# "pass" => "guest"
# }
# ]
# node.datadog.rabbitmq.instances =
# [
# {
# "api_url" => "http://localhost:15672/api/",
# "user" => "guest",
# "pass" => "guest",
# "ssl_verify" => "true"
# }
# ]

datadog_monitor 'rabbitmq' do
instances node['datadog']['rabbitmq']['instances']
Expand Down
1 change: 1 addition & 0 deletions spec/integrations/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- rabbitmq_api_url: http://localhost:15672/api/
rabbitmq_user: guest
rabbitmq_pass: guest
ssl_verify: true
tags:
- optional_tag1
- optional_tag2
Expand Down
3 changes: 2 additions & 1 deletion templates/default/rabbitmq.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
instances:
# for every instance a 'rabbitmq_api_url' must be provided, pointing to the api
# url of the RabbitMQ Managment Plugin (http://www.rabbitmq.com/management.html)
# optional: 'rabbitmq_user' (default: guest) and 'rabbitmq_pass' (default: guest)
# optional: 'rabbitmq_user' (default: guest), 'rabbitmq_pass' (default: guest), and 'ssl_verify' (default: true)
<% @instances.each do |i| -%>
- rabbitmq_api_url: <%= i['api_url'] %>
rabbitmq_user: <%= i['user'] || 'guest' %>
rabbitmq_pass: <%= i['pass'] || 'guest' %>
ssl_verify: <%= i['ssl_verify'] || 'true' %>
<% if i.key?('tags') -%>
tags:
<% i['tags'].each do |x| -%>
Expand Down

0 comments on commit c6ade18

Please sign in to comment.