Skip to content

Commit

Permalink
ssl support
Browse files Browse the repository at this point in the history
  • Loading branch information
James Legg committed Apr 2, 2014
1 parent 81bed26 commit 6a7d330
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions plugins/rabbitmq/check-rabbitmq-messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CheckRabbitMQMessages < Sensu::Plugin::Check::CLI
option :port,
:description => "RabbitMQ management API port",
:long => "--port PORT",
:proc => proc {|p| p.to_i},
:proc => proc { |p| p.to_i },
:default => 55672

option :user,
Expand All @@ -36,6 +36,12 @@ class CheckRabbitMQMessages < Sensu::Plugin::Check::CLI
:long => "--password PASSWORD",
:default => "guest"

option :ssl,
:description => "Enable SSL for connection to the API",
:long => "--ssl",
:boolean => true,
:default => false

option :warn,
:short => '-w NUM_MESSAGES',
:long => '--warn NUM_MESSAGES',
Expand All @@ -54,7 +60,8 @@ def get_rabbitmq_info
:host => config[:host],
:port => config[:port],
:user => config[:user],
:password => config[:password]
:password => config[:password],
:ssl => config[:ssl]
)
rescue
warning "could not get rabbitmq info"
Expand Down

0 comments on commit 6a7d330

Please sign in to comment.