diff options
author | Vladimir Kobal <vlad@prokk.net> | 2022-11-11 09:12:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 09:12:46 +0100 |
commit | 771bea59cae17cf0ded919b59e9cf3063d66daee (patch) | |
tree | 6f2b1ec706f6a2fafc069e2ae3aebb63f6a4de65 /exporting/prometheus | |
parent | 6dec9601f9def04211cb59f8df63567eacfa5480 (diff) |
Add _total suffix to raw increment metrics for remote write (#13977)
Fixes https://github.com/netdata/netdata/issues/13963
Diffstat (limited to 'exporting/prometheus')
-rw-r--r-- | exporting/prometheus/remote_write/remote_write.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/exporting/prometheus/remote_write/remote_write.c b/exporting/prometheus/remote_write/remote_write.c index 15f5e41036..2e2fa3c129 100644 --- a/exporting/prometheus/remote_write/remote_write.c +++ b/exporting/prometheus/remote_write/remote_write.c @@ -257,6 +257,11 @@ int format_dimension_prometheus_remote_write(struct instance *instance, RRDDIM * return 0; } + if (rd->algorithm == RRD_ALGORITHM_INCREMENTAL || rd->algorithm == RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL) { + if (strcmp(rrdset_module_name(rd->rrdset), "prometheus")) + suffix = "_total"; + } + if (homogeneous) { // all the dimensions of the chart, has the same algorithm, multiplier and divisor // we add all dimensions as labels |