From 38d28d792bc483e128befd31a7b65e4e07b37e97 Mon Sep 17 00:00:00 2001 From: Aleksey Shirokih Date: Sun, 10 Jul 2016 12:42:29 +0400 Subject: [PATCH] Extend sanitizedChars array We are using metrics names devided with | so, we have to name metrics with | and \. lets extend that array to fix naming --- plugins/outputs/prometheus_client/prometheus_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/outputs/prometheus_client/prometheus_client.go b/plugins/outputs/prometheus_client/prometheus_client.go index 804ae1fad..65354076f 100644 --- a/plugins/outputs/prometheus_client/prometheus_client.go +++ b/plugins/outputs/prometheus_client/prometheus_client.go @@ -13,7 +13,7 @@ import ( ) var ( - sanitizedChars = strings.NewReplacer("/", "_", "@", "_", " ", "_", "-", "_", ".", "_") + sanitizedChars = strings.NewReplacer("/", "_", "@", "_", " ", "_", "-", "_", ".", "_", "|", "_", "\\", "") // Prometheus metric names must match this regex // see https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels