Browse Source

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

Vladimir Kobal 4 years ago
parent
commit
5f1cd798f3
1 changed files with 2 additions and 1 deletions
  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) {
                             p.type = "counter";
                             p.relation = "delta gives";
-                            p.suffix = "_total";
+                            if (!prometheus_collector)
+                                p.suffix = "_total";
                         }
 
                         if (homogeneous) {