With the config below the Targets page of my main prometheus instance shows:
Get "https://prometheus-swarm:80/federate?match%5B%5D=%7B__name__%3D~%22..%2A%22%7D": http: server gave HTTP response to HTTPS client
It's configured as http so I don't get why it tries to open https. When I open a shell inside the prometheus container and ise wget (there is no curl in the container) to load that URL it works fine and I get back the metrics I need.
I had a config error in HaProxy before where it did try to redirect to https but that's long gone now. I have restarted and recreated the container but it keeps trying to open https. Even if I add the internal domain name to the target so it thinks it has a new target to load it tries to load over https.
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'monitor'
rule_files:
- 'alerts.yml'
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets: ['alert-manager:9093']
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
# FEDERATION FROM SWARM
- job_name: 'federate_swarm'
scrape_interval: 5s
honor_labels: true
metrics_path: '/federate'
scheme: http
params:
'match[]':
- '{__name__=~"..*"}'
static_configs:
- targets:
- 'prometheus-swarm'
With the config below the Targets page of my main prometheus instance shows:
Get "https://prometheus-swarm:80/federate?match%5B%5D=%7B__name__%3D~%22..%2A%22%7D": http: server gave HTTP response to HTTPS clientIt's configured as http so I don't get why it tries to open https. When I open a shell inside the prometheus container and ise wget (there is no curl in the container) to load that URL it works fine and I get back the metrics I need.
I had a config error in HaProxy before where it did try to redirect to https but that's long gone now. I have restarted and recreated the container but it keeps trying to open https. Even if I add the internal domain name to the target so it thinks it has a new target to load it tries to load over https.