lib/riemann/tools/consul_health.rb in riemann-tools-1.10.0 vs lib/riemann/tools/consul_health.rb in riemann-tools-1.11.0

- old
+ new

@@ -18,9 +18,11 @@ opt :prefix, 'prefix to use for all service names when reporting', default: 'consul ' opt :minimum_services_per_node, 'minimum services per node (default: 0)', default: 0 opt :user_agent, 'User-Agent header for HTTP requests', short: :none, default: "#{File.basename($PROGRAM_NAME)}/#{Riemann::Tools::VERSION} (+https://github.com/riemann/riemann-tools)" def initialize + super + @hostname = opts[:consul_host] @prefix = opts[:prefix] @minimum_services_per_node = opts[:minimum_services_per_node] @underlying_ip = IPSocket.getaddress(@hostname) @consul_leader_url = URI.parse("http://#{opts[:consul_host]}:#{opts[:consul_port]}/v1/status/leader")