How to configure Prometheus to have an integration with blackbox running on https

94 views
Skip to first unread message

Santanu Mishra

unread,
Aug 24, 2022, 2:04:26 PM8/24/22
to Prometheus Users
Hi Team,
      I have a blackbox container running as "https://blackbox-dev.xyz.com/" in a OpenShift cluster. I have Prometheus running as separate container "https://prometheus-dev.xyz.com/graph". 
I am unable to connect Prometheus with Blackbox using below config in prometheus.yml.

I am getting 'Get "http://blackbox-dev.xyz.com:443/metrics: context deadline exceeded"


global:

scrape_interval: 30s

evaluation_interval: 5s



rule_files:

- ./alert.rules



scrape_configs:

- job_name: blackbox # To get metrics about the exporter itself

metrics_path: /metrics

static_configs:

- targets:

- blackbox-dev.xyz.com:443 


Thanks!

Santanu Mishra

unread,
Aug 25, 2022, 2:49:17 PM8/25/22
to Prometheus Users
Hi Brian,
     Any inputs on this issue ?

Thanks!

Brian Candler

unread,
Aug 25, 2022, 3:05:00 PM8/25/22
to Prometheus Users
If you read your error message carefully:

> I am getting 'Get "http://blackbox-dev.xyz.com:443/metrics: context deadline exceeded"

then it looks like Prometheus is trying to talk to an http:// endpoint; but you said it was https://.

Put "scheme: https" in your scrape job config to use https.  If your certificate is not signed by a public CA like LetsEncrypt then you may need additional settings to get the certificate validation to work.

If that's not the problem, then it's probably an issue with kubernetes or openshift, not prometheus.

Santanu Mishra

unread,
Aug 25, 2022, 3:41:29 PM8/25/22
to Prometheus Users
Hi Brian,
     We will have a look at the suggestions.
Thanks!

Reply all
Reply to author
Forward
0 new messages