summaryrefslogtreecommitdiff
path: root/lib/oxidized/source
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/source')
-rw-r--r--lib/oxidized/source/csv.rb2
-rw-r--r--lib/oxidized/source/http.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/oxidized/source/csv.rb b/lib/oxidized/source/csv.rb
index 5b43352..c8654b2 100644
--- a/lib/oxidized/source/csv.rb
+++ b/lib/oxidized/source/csv.rb
@@ -22,8 +22,10 @@ module Oxidized
nodes = []
open_file.each_line do |line|
next if line.match(/^\s*#/)
+
data = line.chomp.split(@cfg.delimiter, -1)
next if data.empty?
+
# map node parameters
keys = {}
@cfg.map.each do |key, position|
diff --git a/lib/oxidized/source/http.rb b/lib/oxidized/source/http.rb
index 26c9e05..0c3c7fd 100644
--- a/lib/oxidized/source/http.rb
+++ b/lib/oxidized/source/http.rb
@@ -21,6 +21,7 @@ module Oxidized
data = string_navigate(data, @cfg.hosts_location) if @cfg.hosts_location?
data.each do |node|
next if node.empty?
+
# map node parameters
keys = {}
@cfg.map.each do |key, want_position|