Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configure prometheus targets to read metrics from text file

Tags:

prometheus

is it possible to configure Prometheus to use text file as the source of metrics?

i tried config prometheus.yml like below but that not works.

scrape_configs:
  - job_name: 'custom_job'
    static_configs:
    - targets: ['C:\CustomJobLogs\metrics.txt']

does Prometheus support metrics from text file or not?

like image 982
kira Avatar asked Oct 18 '25 11:10

kira


1 Answers

if you use windows, use textfile collector from wmi_exporter

and if you use linux, use textfile collector from node_exporter

like image 77
sajjad kalantari Avatar answered Oct 20 '25 12:10

sajjad kalantari



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!