On Wednesday, 8 July 2020 12:19:17 UTC+1, Rafael Quintela wrote:
>
> How do I configure my prometheus.yaml to scrap metrcis from my domain 
> based backend web server?
>
>
If app1.io, app2.io and app3.io all resolve to the correct IP address, then 
just scrape app1.io, app2.io and app3.io.  If they don't, then the easiest 
solution is to put an entry in /etc/hosts so that they do:

99.84.16.181 app1.io app2.io app3.io

If not, then it gets messy when using https.  You need to use server_name 
to tell prometheus what virtual host to connect to (SNI).  I don't *think* 
there is a way to do this using special labels, so it means a separate 
scrape job per host:

job_name: app1.io
  tls_config:
    server_name: app1.io
  static_configs:
    - targets: [99.84.16.181]

job_name: app2.io
  tls_config:
    server_name: app2.io
  static_configs:
    - targets: [99.84.16.181]

-- 
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/e1a0ea4e-471b-4896-a152-badedf03454co%40googlegroups.com.

Reply via email to