diff options
Diffstat (limited to 'lib/oxidized')
-rw-r--r-- | lib/oxidized/node.rb | 2 | ||||
-rw-r--r-- | lib/oxidized/nodes.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 2d41600..253de53 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -11,7 +11,7 @@ module Oxidized def initialize opt @name = opt[:name] @ip = IPAddr.new(opt[:ip]).to_s rescue nil - @ip ||= Resolv.getaddress @name + @ip ||= Resolv.new.getaddress @name @group = opt[:group] @input = resolve_input opt @output = resolve_output opt diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb index 3586b97..cb2fbc5 100644 --- a/lib/oxidized/nodes.rb +++ b/lib/oxidized/nodes.rb @@ -23,8 +23,8 @@ module Oxidized Log.error "node %s is not resolvable, raised %s with message '%s'" % [node, err.class, err.message] end end - Log.info "Loaded #{size} nodes" size == 0 ? replace(new) : update_nodes(new) + Log.info "Loaded #{size} nodes" end end |