From 3c5b5f4d715068f1fccb556377adf12b4a922c48 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Mon, 20 Dec 2021 18:29:01 +0100 Subject: [PATCH] Start with README --- internal/ccMetric/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 internal/ccMetric/README.md diff --git a/internal/ccMetric/README.md b/internal/ccMetric/README.md new file mode 100644 index 0000000..d0d96a1 --- /dev/null +++ b/internal/ccMetric/README.md @@ -0,0 +1,18 @@ +# ClusterCockpit metrics + +As described in the [ClusterCockpit specifications](https://github.com/ClusterCockpit/cc-specifications), the whole ClusterCockpit stack uses metrics in the InfluxDB line protocol format. This is also the input and output format for the ClusterCockpit Metric Collector but internally it uses an extended format while processing, named CCMetric. + +It is basically a copy of the [InfluxDB line protocol](https://github.com/influxdata/line-protocol) `MutableMetric` interface with one extension. Besides the tags and fields, it contains a list of meta information (re-using the `Tag` structure of the original protocol): + +``` +type ccMetric struct { + name string // same as + tags []*influx.Tag // original + fields []*influx.Field // Influx + tm time.Time // line-protocol + meta []*influx.Tag +} +``` + +The `CCMetric` interface provides the same functions as the `MutableMetric` like `{Add, Remove, Has}{Tag, Field}` and additionally provides `{Add, Remove, Has}Meta` +