From 78f1fcd122d3e807465900bb0ca14c1964d67ce4 Mon Sep 17 00:00:00 2001 From: Taylan Develioglu Date: Fri, 24 Jun 2016 14:25:49 +0200 Subject: [PATCH] Do *not* use the titleized name of the metric because it can contain spaces. The titleized name of a metric is its name with underscores replaced with spaces and the first word capitalized. This causes metrics for resources with underscores in the name not to work because graphite doesn't allow spaces in metric names. This commit changes the report processor to use the standard name instead. --- lib/puppet/reports/graphite.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/reports/graphite.rb b/lib/puppet/reports/graphite.rb index a5a670c..c2a1224 100644 --- a/lib/puppet/reports/graphite.rb +++ b/lib/puppet/reports/graphite.rb @@ -48,7 +48,7 @@ def process epochtime = Time.now.utc.to_i self.metrics.each { |metric,data| data.values.each { |val| - name = "#{prefix}.#{val[1]}.#{metric}" + name = "#{prefix}.#{val[0]}.#{metric}" value = val[2] send_metric "#{name} #{value} #{epochtime}"