How to do `healthcheck` on traefik itself?

The documentation left out the ./ and it needs the --ping to be specified

docker exec 48d286711eae ./traefik healthcheck --ping

time="2019-09-05T11:13:31Z" level=info msg="Configuration loaded from flags."
OK: http://:8080/ping

also healthcheck ignores any attempts to disable logging, so --log=false or --log.level=ERROR still displays the message

So the final solution you would think at the moment is the following in the docker-compose.yml file.

    healthcheck:
      test: ./traefik healtcheck --ping 

However, when adding that, it terminates traefik.

1 Like