]> granicus.if.org Git - icinga2/commitdiff
Fix InfluxDB Writer Key Escaping
authorSimon Murray <spjmurray@yahoo.co.uk>
Mon, 27 Jun 2016 09:38:07 +0000 (10:38 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 27 Jun 2016 10:07:07 +0000 (12:07 +0200)
The escaping wasn't being performed on measuerments, keys or tag values.  The
escape function was returning the input and not the modified ouput, so this
has been fixed

refs #12047

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
lib/perfdata/influxdbwriter.cpp

index 1fdeca17ea882c0b624eceb56457c9ef3f121932..92091aafb83910565856e51ad5569739e9bca4da 100644 (file)
@@ -237,7 +237,7 @@ String InfluxdbWriter::EscapeKey(const String& str)
        String result = str;
        boost::algorithm::replace_all(result, ",", "\\,");
        boost::algorithm::replace_all(result, " ", "\\ ");
-       return str;
+       return result;
 }
 
 String InfluxdbWriter::EscapeField(const String& str)