miekg / caddy-prometheus

Prometheus metrics middleware for caddy
Apache License 2.0
65 stars 26 forks source link

/metrics returns 404 #20

Closed stanislavromanov closed 7 years ago

stanislavromanov commented 7 years ago

Even when I enable the prometheus and I have prometheus extension it returns me 404 when I go to /metrics url. Am I doing something wrong?

Here is my Caddyfile

mydomain.com {
        prometheus
        root /var/www/lab3
}
haylinmoore commented 5 years ago

How did you fix this?

hairyhenderson commented 5 years ago

@herohamp if you're having an issue it's probably best to open a new one instead of commenting on an issue that closed almost 2 years ago 😉

That being said, it's worth remembering that the /metrics endpoint is served on a different address than the site itself. See https://github.com/miekg/caddy-prometheus#use for details.

haylinmoore commented 5 years ago

Yeah that probably would have been the smart thing to do ;P I ended up figuring it out