ec2_sd_configs with blackbox

31 views
Skip to first unread message

Yair

unread,
May 10, 2020, 1:13:57 PM5/10/20
to Prometheus Users
Hi all

i have multi ec2 machines with scaling , on  each of the machines i run app that have http health check ,
can i set __meta_ec2_tag_Name (auto discovery) and also blackbox (http_2xx) on new & existing ec2 machines so Prometheus will auto set targets with http_2xx probe ?
i set blackbox  in Prometheus  with manual target  ip and it's works fine need support for auto discovery Mechanism.

thanks for your help.
Yair

Julien Pivotto

unread,
May 10, 2020, 3:01:12 PM5/10/20
to Prometheus Users
You could try:

- ec2_sd_configs:
- <your config>
params:
module: [http_2xx]
relabel_configs:
- source_labels: [__meta_ec2_tag_blackbox_target]
action: keep
- source_labels: [__meta_ec2_private_ip]
target_labels: __params_target
- target_label: __address__
replacement: 127.0.0.1:9115 # The blackbox exporter's real hostname:port.


regards,

>
> thanks for your help.
> Yair
>
> --
> 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/bb10d77c-fcfe-4fba-952a-e8874a9fe129%40googlegroups.com.


--
(o- Julien Pivotto
//\ Open-Source Consultant
V_/_ Inuits - https://www.inuits.eu
signature.asc
Reply all
Reply to author
Forward
0 new messages