diff options
Diffstat (limited to 'lib/oxidized')
-rw-r--r-- | lib/oxidized/node.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 4105da0..04c1f08 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -15,9 +15,9 @@ module Oxidized ip_addr, _ = opt[:ip].to_s.split("/") Oxidized.logger.debug 'IPADDR %s' % ip_addr.to_s @name = opt[:name] - @ip = @name unless Oxidized.config.resolve_dns? - @ip ||= IPAddr.new(ip_addr).to_s rescue nil - @ip ||= Resolv.new.getaddress @name + @ip = IPAddr.new(ip_addr).to_s rescue nil + @ip ||= Resolv.new.getaddress(@name) if Oxidized.config.resolve_dns? + @ip ||= @name @group = opt[:group] @input = resolve_input opt @output = resolve_output opt |