1. Caddy version (caddy version
):
v2.1.1 h1:X9k1+ehZPYYrSqBvf/ocUgdLSRIuiNiMo7CvyGUQKeA=
2. How I run Caddy:
I run Caddy in docker with docker-compose with static configuration
a. System environment:
Docker
b. Command:
CMD ["/usr/bin/caddy", "run", "--config", "/etc/Caddyfile"]
d. My complete Caddyfile or JSON config:
{
experimental_http3
admin 0.0.0.0:2019 {
metrics /metrics
}
}
3. The problem I’m having:
As per docs I’m trying to scrape metrics
but 404 is returned.
(running inside container)
/srv # curl -v localhost:2019/metrics
* Trying 127.0.0.1:2019...
* Connected to localhost (127.0.0.1) port 2019 (#0)
> GET /metrics HTTP/1.1
> Host: localhost:2019
> User-Agent: curl/7.69.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Sun, 06 Dec 2020 10:39:17 GMT
< Content-Length: 19
<
404 page not found
* Connection #0 to host localhost left intact
4. Error messages and/or full log output:
{"level":"info","ts":1607251157.8994603,"logger":"admin.api","msg":"received request","method":"GET","host":"localhost:2019","uri":"/metrics","remote_addr":"127.0.0.1:44546","headers":{"Accept":["*/*"],"User-Agent":["curl/7.69.1"]}}
5. What I already tried:
Reconfigure, tried to debug with curl and logs
Any help or suggestions will be highly appreciated
Thanks for supporting this great product