From: Gunnar Beutner Date: Sun, 17 Nov 2013 11:49:47 +0000 (+0100) Subject: Improve Graphite output for multi performance data. X-Git-Tag: v0.0.5~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37d9ccde9417b236d47ac741ff5ba983cb2e359f;p=icinga2 Improve Graphite output for multi performance data. Refs #5082 --- 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); } }