From 478fb0787f945e657ae85b71d30481c58ce3f993 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Wed, 4 May 2022 12:24:40 +0200 Subject: [PATCH] Add to MetricRouter README --- internal/metricRouter/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/internal/metricRouter/README.md b/internal/metricRouter/README.md index b0318db..ea5469d 100644 --- a/internal/metricRouter/README.md +++ b/internal/metricRouter/README.md @@ -51,6 +51,11 @@ The CCMetric router sits in between the collectors and the sinks and can be used ], "rename_metrics" : { "metric_12345" : "mymetric" + }, + "normalize_units" : true, + "change_unit_prefix" { + "mem_used" : "G", + "mem_total" : "G" } } ``` @@ -170,6 +175,13 @@ This option takes a list of evaluable conditions and performs them one after the The first line is comparable with the example in `drop_metrics`, it drops all metrics starting with `drop_metric_` and ending with a number. The second line drops all metrics of the first hardware thread (**not** recommended) +## The `normalize_units` option +The cc-metric-collector tries to read the data from the system as it is reported. If available, it tries to read the metric unit from the system as well (e.g. from `/proc/meminfo`). The problem is that, depending on the source, the metric units are named differently. Just think about `byte`, `Byte`, `B`, `bytes`, ... +The [cc-units](https://github.com/ClusterCockpit/cc-units) package provides us a normalization option to use the same metric unit name for all metrics. It this option is set to true, all `unit` meta tags are normalized. + +## The `change_unit_prefix` section +It is often the case that metrics are reported by the system using a rather outdated unit prefix (like `/proc/meminfo` still uses kByte despite current memory sizes are in the GByte range). If you want to change the prefix of a unit, you can do that with the help of [cc-units](https://github.com/ClusterCockpit/cc-units). The setting works on the metric name and requires the new prefix for the metric. The cc-units package determines the scaling factor. + # Aggregate metric values of the current interval with the `interval_aggregates` option **Note:** `interval_aggregates` works only if `num_cache_intervals` > 0