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

This commit is contained in:
Vladimir Kobal 2021-02-25 15:11:49 +02:00 committed by GitHub
parent cb99a3089c
commit 5f1cd798f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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) {