[icinga-checkins] icinga.org: icinga2/master: Fix InfluxDB Writer Key Escaping

git at icinga.org git at icinga.org
Mon Jun 27 12:08:39 CEST 2016


Module: icinga2
Branch: master
Commit: c6add53152ccd620cd7cea5ad75d5f4ec6027212
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=c6add53152ccd620cd7cea5ad75d5f4ec6027212

Author: Simon Murray <spjmurray at yahoo.co.uk>
Date:   Mon Jun 27 10:38:07 2016 +0100

Fix InfluxDB Writer Key Escaping

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 at netways.de>

---

 lib/perfdata/influxdbwriter.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/perfdata/influxdbwriter.cpp b/lib/perfdata/influxdbwriter.cpp
index 1fdeca1..92091aa 100644
--- a/lib/perfdata/influxdbwriter.cpp
+++ b/lib/perfdata/influxdbwriter.cpp
@@ -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)



More information about the icinga-checkins mailing list