Add _total suffix to raw increment metrics for remote write (#13977)
Fixes https://github.com/netdata/netdata/issues/13963
Vladimir Kobal committed
Nov 11, 2022 at 09:12 UTC
771bea59cae17cf0ded919b59e9cf3063d66daee
1 file changed
+5
exporting/prometheus/remote_write/remote_write.c
+5
@@ -257,6 +257,11 @@ int format_dimension_prometheus_remote_write(struct instance *instance, RRDDIM *
257
return 0;
258
}
259
260
+ if (rd->algorithm == RRD_ALGORITHM_INCREMENTAL || rd->algorithm == RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL) {
261
+ if (strcmp(rrdset_module_name(rd->rrdset), "prometheus"))
262
+ suffix = "_total";
263
+ }
264
+
265
if (homogeneous) {
266
// all the dimensions of the chart, has the same algorithm, multiplier and divisor
267
// we add all dimensions as labels