mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-03 18:25:07 +01:00 
			
		
		
		
	Add to MetricRouter README
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user