From 29704b5f2721a742d312ced784a8076e27e8063b Mon Sep 17 00:00:00 2001 From: laf Date: Fri, 10 Nov 2017 14:12:13 +0000 Subject: Added sql support for calling for single host --- lib/oxidized/source/http.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/oxidized/source/http.rb') diff --git a/lib/oxidized/source/http.rb b/lib/oxidized/source/http.rb index e4cb58e..73df6f7 100644 --- a/lib/oxidized/source/http.rb +++ b/lib/oxidized/source/http.rb @@ -15,7 +15,7 @@ class HTTP < Source require "uri" require "json" - def load node=nil + def load node_want=nil nodes = [] uri = URI.parse(@cfg.url) http = Net::HTTP.new(uri.host, uri.port) @@ -29,8 +29,8 @@ class HTTP < Source end req_uri = uri.request_uri - if node - req_uri = "#{req_uri}/#{node}" + if node_want + req_uri = "#{req_uri}/#{node_want}" end request = Net::HTTP::Get.new(req_uri, headers) if (@cfg.user? && @cfg.pass?) -- cgit v1.2.1