Prometheus text file
The Prometheus text file input plugin allows Fluent Bit to read metrics from Prometheus text format files (.prom files) on the local filesystem. Use this plugin to collect custom metrics that are written to files by external applications or scripts, similar to the Prometheus Node Exporter text file collector.
Configuration parameters
path
File or directory path pattern. Supports glob patterns with * wildcard (for example, /var/lib/prometheus/*.prom).
none
scrape_interval
Interval in seconds between file scans.
10s
Get started
Basic configuration
The following configuration will monitor /var/lib/prometheus/textfile directory for .prom files every 15 seconds:
pipeline:
inputs:
- name: prometheus_textfile
tag: custom_metrics
path: '/var/lib/prometheus/textfile/*.prom'
scrape_interval: 15
outputs:
- name: prometheus_exporter
match: custom_metrics
host: 192.168.100.61
port: 2021Prometheus text format
The plugin expects files to be in the standard Prometheus text exposition format. Here's an example of a valid .prom file:
Use cases
Custom application metrics
Applications can write custom metrics to .prom files, and this plugin will collect them:
Batch job metrics
Cron jobs or batch processes can write completion metrics:
System integration
External monitoring tools can write metrics that Fluent Bit will collect and forward.
Integration with other plugins
OpenTelemetry destination
Last updated
Was this helpful?