On 10 May 10:13, Yair wrote:
> 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.

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 [email protected].
> 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

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/20200510190106.GA20797%40oxygen.

Attachment: signature.asc
Description: PGP signature

Reply via email to