bin/metrics-ceph-osd.rb in sensu-plugins-ceph-1.0.1 vs bin/metrics-ceph-osd.rb in sensu-plugins-ceph-1.0.2
- old
+ new
@@ -76,10 +76,10 @@
# Left side of wildcard
strip1 = config[:pattern].match(/^.*\*/).to_s.delete('*')
# Right side of wildcard
strip2 = config[:pattern].match(/\*.*$/).to_s.delete('*')
osd_num = socket.gsub(strip1, '').gsub(strip2, '')
- JSON.parse(data).each do |k, v|
+ ::JSON.parse(data).each do |k, v|
k = k.gsub(/\/$/, '').gsub(/\//, '_')
output_data(v, "#{osd_num}.#{k}")
end
end
end