mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-07-23 21:31:41 +02:00
Merge develop into main for documentation (#143)
* Fix Release part * Fix Release part * Update Hugo integration (#142)
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
<!--
|
||||
---
|
||||
title: Metric Aggregator
|
||||
description: Subsystem for evaluating expressions on metrics (deprecated)
|
||||
categories: [cc-metric-collector]
|
||||
tags: ['Developer']
|
||||
weight: 1
|
||||
hugo_path: docs/reference/cc-metric-collector/internal/metricaggregator/_index.md
|
||||
---
|
||||
-->
|
||||
|
||||
# The MetricAggregator
|
||||
|
||||
In some cases, further combination of metrics or raw values is required. For that strings like `foo + 1` with runtime dependent `foo` need to be evaluated. The MetricAggregator relies on the [`gval`](https://github.com/PaesslerAG/gval) Golang package to perform all expression evaluation. The `gval` package provides the basic arithmetic operations but the MetricAggregator defines additional ones.
|
||||
@@ -35,4 +46,4 @@ The MetricAggregator provides these functions additional to the `Full` language
|
||||
## Limitations
|
||||
|
||||
- Since the metrics are written in JSON files which do not allow `""` without proper escaping inside of JSON strings, you have to use `''` for strings.
|
||||
- Since `\` is interpreted by JSON as escape character, it cannot be used in metrics. But it is required to write regular expressions. So instead of `/`, use `%` and the MetricAggregator replaces them after reading the JSON file.
|
||||
- Since `\` is interpreted by JSON as escape character, it cannot be used in metrics. But it is required to write regular expressions. So instead of `/`, use `%` and the MetricAggregator replaces them after reading the JSON file.
|
||||
|
Reference in New Issue
Block a user