Promtail error: HTTP request to an HTTPS server

I’m trining to setup prom tail with a docker_sd_config scrape config:

scrape_configs:

  • job_name: docker
    docker_sd_configs:
    • host: “https://10.0.10.10:2376
      tls_config:
      ca_file: /etc/promtail/ca.pem
      cert_file: /etc/promtail/cert.pem
      key_file: /etc/promtail/key.pem

The discovery of the containers is successful but it can’t retrieve the logs and fails with:

level=error ts=2022-04-19T08:06:09.304635232Z caller=target_group.go:95 msg=“added Docker target” containerID=ae0433c80d00aae14fa3428e88a25a431bc36edb88c15a30dc0a7618fe7e3de9
level=error ts=2022-04-19T08:06:09.325492454Z caller=target.go:101 target=docker/ae0433c80d00aae14fa3428e88a25a431bc36edb88c15a30dc0a7618fe7e3de9 msg=“could not fetch logs for container” container=ae0433c80d00aae14fa3428e88a25a431bc36edb88c15a30dc0a7618fe7e3de9 err=“Error response from daemon: Client sent an HTTP request to an HTTPS server.”

Can someone help me? What am I doing wrong. The docker API uses TLS and is exposed on Port 2376. I’m using promtail version 2.5.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.