From de9577c45f523e26240dc764230d841450bf9fd8 Mon Sep 17 00:00:00 2001 From: Elliott Clark Date: Mon, 17 Oct 2011 18:34:53 -0700 Subject: [PATCH] Make sure stats have fields and values Some stats were 0 length and erroring out graphite --- munin-graphite.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/munin-graphite.rb b/munin-graphite.rb index 25387c0..3450c8f 100755 --- a/munin-graphite.rb +++ b/munin-graphite.rb @@ -94,7 +94,7 @@ def close line =~ /^(.+)\.value\s+(.+)$/ field = $1 value = $2 - all_metrics << "#{mname}.#{metric}.#{field} #{value} #{Time.now.to_i}" + all_metrics << "#{mname}.#{metric}.#{field} #{value} #{Time.now.to_i}" if (value != nil and value.length > 0 and field != nil and field.length > 0) end end end