Univention Bugzilla – Bug 55367
UCS Monitoring: write timestamps into node collector files to be more accurate
Last modified: 2023-07-19 17:53:47 CEST
The node collector collects every N times all metrics from the .prom files. This is a little bit inaccurate because we don't write the timestamp when the metrics were actually created. This can easily be added as the prom format allows to add a timestamp: https://prometheus.io/docs/instrumenting/exposition_formats/ metric_name [ "{" label_name "=" `"` label_value `"` { "," label_name "=" `"` label_value `"` } [ "," ] "}" ] value [ timestamp ] The timestamp is an int64 (milliseconds since epoch, i.e. 1970-01-01 00:00:00 UTC, excluding leap seconds), represented as required by Go's ParseInt() function. We also use a self-written library but Debian also provides python3-prometheus-client, which does the protocol handling. We should use that instead.
https://git.knut.univention.de/univention/ucs/-/merge_requests/551
Metrics are now written with timestamps using the python3-prometheus-client library. univention-monitoring-client.yaml 1fb31b9bfed2 | refactor(monitoring): use prometheus library univention-monitoring-client (1.0.2-4) b60d75576c11 | feat(monitoring): add timestamp to metrics to be more accurate 1fb31b9bfed2 | refactor(monitoring): use prometheus library
QA: - timestamps in metrics: OK - advisories: OK - no related tracebacks/errors in logfiles: OK
<https://errata.software-univention.de/#/?erratum=5.0x743>