From 37d9ccde9417b236d47ac741ff5ba983cb2e359f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 17 Nov 2013 12:49:47 +0100 Subject: [PATCH] Improve Graphite output for multi performance data. Refs #5082 --- components/perfdata/graphitewriter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/perfdata/graphitewriter.cpp b/components/perfdata/graphitewriter.cpp index bf53a68d3..949ab7da8 100644 --- a/components/perfdata/graphitewriter.cpp +++ b/components/perfdata/graphitewriter.cpp @@ -117,7 +117,11 @@ void GraphiteWriter::CheckResultHandler(const Service::Ptr& service, const Check else valueNum = static_cast(value)->GetValue(); - SendMetric(prefix, key, valueNum); + String escaped_key = key; + SanitizeMetric(escaped_key); + boost::algorithm::replace_all(escaped_key, "::", "."); + + SendMetric(prefix, escaped_key, valueNum); } } -- 2.40.0