MCPcopy Create free account
hub / github.com/Icinga/icinga2 / EscapeTag

Method EscapeTag

lib/perfdata/opentsdbwriter.cpp:423–432  ·  view source on GitHub ↗

* Escape tags for OpenTSDB * http://opentsdb.net/docs/build/html/user_guide/query/timeseries.html#precisions-on-metrics-and-tags * * @param str Tag name * @return Escaped tag */

Source from the content-addressed store, hash-verified

421 * @return Escaped tag
422 */
423String OpenTsdbWriter::EscapeTag(const String& str)
424{
425 String result = str;
426
427 boost::replace_all(result, " ", "_");
428 boost::replace_all(result, "\\", "_");
429 boost::replace_all(result, ":", "_");
430
431 return result;
432}
433
434/**
435 * Escape metric name for OpenTSDB

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected