Просмотр исходного кода

Don't add duplicate _total suffixes for the prometheus go.d module (#10674)

Vladimir Kobal 4 лет назад
Родитель
Сommit
5f1cd798f3
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      exporting/prometheus/prometheus.c

+ 2 - 1
exporting/prometheus/prometheus.c

@@ -660,7 +660,8 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus(
                             rd->algorithm == RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL) {
                             rd->algorithm == RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL) {
                             p.type = "counter";
                             p.type = "counter";
                             p.relation = "delta gives";
                             p.relation = "delta gives";
-                            p.suffix = "_total";
+                            if (!prometheus_collector)
+                                p.suffix = "_total";
                         }
                         }
 
 
                         if (homogeneous) {
                         if (homogeneous) {