Prometheus scrape targets regex

1,096 views
Skip to first unread message

nbada...@gmail.com

unread,
May 1, 2021, 3:57:03 AM5/1/21
to Prometheus Users
Hi Guys,

I have process exporter installed on some of the nodes, and i have below snippet setup in prometheus.yml:

  - job_name: 'process'
    static_configs:
     - targets: [host1:9256, host2:9256, host3:9256.........host10:9256]

Problem with above setup is that every time i onboard process exporter on a new node, i have to update targets list manually and redeploy the prometheus.

is there any was that i can make this works dynamically? so what i meant is, every time prometheus refreshes its scrape it should pick the newly installed node.

Appreciate your quick response.

Regards,
Naveen.


Ben Kochie

unread,
May 1, 2021, 4:08:33 AM5/1/21
to nbada...@gmail.com, Prometheus Users
Please see the documented list of available service discovery methods:


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/a2efefef-b9a6-417e-afe6-47de0312ed35n%40googlegroups.com.

Naveen Badam

unread,
May 16, 2021, 6:51:29 AM5/16/21
to Ben Kochie, Prometheus Users
Thank you for your email. It worked for me.
Reply all
Reply to author
Forward
0 new messages