Description
The purpose and use-cases of the new component
I would like to propose a new component, Prometheus Textfile Receiver. This component would provide functional parity with the Node Exporter textfile collector.
Node Exporter provides a textfile collector that scrapes metrics stored in text files ending in the .prom
file extension. It is configured to find all files in configured directories. The Prometheus Textfile receiver would work the same way. You would configure it with a list of directories to search for .prom
files. It would not recursively look into subdirectories.
In addition to metrics found in .prom
files, Node Exporter emits two additional metrics:
node_textfile_mtime_seconds
- how much time has elapsed since the last modification to a discovered.prom
filenode_textfile_scrape_error
- were any errors encountered while scraping the static files
Prometheus Textfile Receiver would emit one additional metric: prometheustextfile.file.mtime
which would provide the same functionality provided by node_textfile_mtime_seconds
. The bundled scrape error metrics provided by OpenTelemetry Collector would cover the functionality provided by node_textfile_scrape_error
.
Example configuration for the component
receivers:
prometheustextfile:
directories:
- /absolute/path/
- /additional/path
Configured directories can end in either /
or not, both will be accepted
Telemetry data types supported
Metrics are supported
Code Owner(s)
Sponsor (optional)
No response
Additional context
No response