* Escape metric label * * Dots are allowed - users can create trees from perfdata labels * * @param str Metric label name * @return Escaped string */
| 440 | * @return Escaped string |
| 441 | */ |
| 442 | String GraphiteWriter::EscapeMetricLabel(const String& str) |
| 443 | { |
| 444 | String result = str; |
| 445 | |
| 446 | //allow to pass '.' in perfdata labels |
| 447 | boost::replace_all(result, " ", "_"); |
| 448 | boost::replace_all(result, "\\", "_"); |
| 449 | boost::replace_all(result, "/", "_"); |
| 450 | boost::replace_all(result, "::", "."); |
| 451 | |
| 452 | return result; |
| 453 | } |
| 454 | |
| 455 | /** |
| 456 | * Escape macro metrics found via host/service name templates |
nothing calls this directly
no outgoing calls
no test coverage detected