diff --git a/check_rabbitmq-sync.rb b/check_rabbitmq-sync.rb index 56c2eb4..8aaf328 100644 --- a/check_rabbitmq-sync.rb +++ b/check_rabbitmq-sync.rb @@ -37,15 +37,13 @@ def usage(optparse) optparse.parse! -if options[:host] !~ /^https?:\/\/.*/ - options[:host] = 'http://' + options[:host] -end - - if options[:host].nil? or options[:user].nil? or options[:password].nil? or options[:vhost].nil? or options[:port].nil? usage(optparse) end +if options[:host] !~ /^https?:\/\/.*/ + options[:host] = 'http://' + options[:host] +end begin uri = URI::parse("#{options[:host]}:#{options[:port]}/api/queues/#{options[:vhost]}")