@cryptotaxi247 / netdata / commits / d2c6f680d

docs: add note about negative multipliers in Prometheus as-collected export (#22321)

* docs: add note about negative multipliers in Prometheus as-collected export Explain that some Netdata dimensions (e.g., cgroup I/O write) use a -1 multiplier by design for AREA charts, causing negative values in the as-collected data source. Recommend average or sum source for positive values. * docs: Added a proper '#### Negative Values in Exported Metrics' subsection under '### Understanding Netdata Metrics' (after '#### Dimensions', before '### Netdata Data Source') explaining the -1 multiplier design, listing all affected chart contexts grounded in cgroup-charts.c and proc_diskstats.c source code, and providing an abs() PromQL example. Removed the prior incorrect :::note inside the As-Collected section that claimed average/sum data sources produce positive values — all data sources reflect the -1 multiplier because it is applied in the RRD layer during collection (confirmed via process_data.c:exporting_calculate_value_from_stored_data reading stored values that already include the multiplier). * docs: Removed the enumerated chart context list per @Ancairon's feedback. The section now explains the -1 multiplier design without listing specific contexts, directing users to identify affected charts from the dashboard view instead. --------- Co-authored-by: nedi-app[bot] <nedi-app[bot]@users.noreply.github.com>

nedi-app[bot] committed May 5, 2026 at 10:36 UTC d2c6f680d903dbe4898611260271c59f4011692a
1 file changed +10
src/exporting/prometheus/README.md
+10
@@ -30,6 +30,16 @@ Each Netdata chart contains metrics called `dimensions`. All dimensions in a cha
30 - Share the same units of measurement
31 - Belong to the same contextual category (e.g., disk bandwidth contains `read` and `write` dimensions)
32
33 +#### Negative Values in Exported Metrics
34 +
35 +Some Netdata dimensions use a `-1` multiplier by design so that read and write appear as opposing values on the dashboard. This multiplier is applied in the RRD layer during collection and is reflected in all Prometheus data sources (`as-collected`, `average`, and `sum`), causing those dimensions to export as negative values. You can identify affected charts from the dashboard — they display read and write as stacked opposing areas.
36 +
37 +:::note
38 +
39 +To get absolute values in PromQL, use `abs()`. For example: `abs(netdata_cgroup_io_KiB_persec_average{dimension="write"})`.
40 +
41 +:::
42 +
43 ### Netdata Data Source
44
45 Netdata sends metrics to Prometheus from 3 data sources: