node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

Support openmetrics format in the text file collector

Open yeya24 opened this issue 4 years ago • 3 comments

I have some use cases to write open metrics format text files with exemplars and use node exporter to collect them. It seems that currently only Text format is supported. Is there any plan to add openmetrics format support?

yeya24 avatar Mar 04 '21 07:03 yeya24

Yes, OpenMetrics support is planned. We need to get full support in the Prometheus Go client library. Once that's ready, we'll be able to implement it here.

SuperQ avatar Mar 04 '21 09:03 SuperQ

Strictly speaking, the support has to be added to https://github.com/prometheus/common in the expfmt package.

Note, however, that OpenMetrics is not very well suited for the text file collector because it doesn't support comments or whitespace between components. I guess we can support it, but we should keep supporting the old text format.

beorn7 avatar Mar 04 '21 18:03 beorn7

Supporting both seems reasonable. Just need to figure out how (e.g two dirs, suffices, magic etc)

discordianfish avatar Mar 06 '21 10:03 discordianfish