Support for OpenMetrics standard
Feature Request
Telegraf supports Prometheus format, which was used as the basis for the OpenMetrics standard. However, there are some differences. Most importantly from my point of view, Dovecot v2.3.14+ uses the "info" type, which Telegraf treats as invalid. It would be nice if Telegraf would add support for this to make it more OpenMetrics standard compliant. (This can't be fixed on Dovecot side without making it violate the OpenMetrics standard, or adding a new configuration option to choose the behavior.)
See https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md
next steps: look into creating a new parser using the existing Prometheus parser as a foundation to correctly parse the new features like info.
Hello, I have an upcoming project where I'm interested in using telegraf with OpenMetrics. I'm wondering if this is on the roadmap for any time soon Thank you
We have also issues with consuming different OpenMetrics endpoints. Have trouble with timestamp format.
Currently [[inputs.prometheus]] only accepts milliseconds timestamp (prometheus format specification).
OpenMetrics describes another timestamp format: Timestamps MUST be Unix Epoch in seconds. You can use milli- or nanoseconds precision with a float64 like: 1520879607.123 or 1520879607.123456
Maybe it's possible to add also this timestamp format to [[inputs.prometheus]], so that we can already consume metrics from OpenMetrics endpoints till telegraf officially supports OpenMetrics format?
So we identified following main differences/evolution to prometheus format:
- new Info and StateSet type
- timestamp format (Unix Epoch in seconds. You can use milli- or nanoseconds precision with a float64 like: 1520879607.123 or 1520879607.123456)
Short summary OpenMetrics vs. Prometheus format: https://www.robustperception.io/openmetrics-is-released/