1. The problem I’m having:
I need to count logins per minutes using Caddy metrics and prometheus
as my setup :
Internet → CADDY → NGINX as API GATEWAY → Login API
for that, there is this section in Caddyfile to reverse proxy the login API
customdomain.fr {
handle /metrics {
@nope not remote_ip private_ranges
abort @nope
metrics
}
}
api.customdomain.fr {
handle /metrics {
@nope not remote_ip private_ranges
abort @nope
metrics
}
handle {
reverse_proxy login-API:80
}
log {
output file /var/log/caddy/customdomain.fr-access.log
format json
}
import common
}
https://api.customdomain.fr/api/login is the endpoint responsible for the login
I want to know to get Grafana dashboard for a series of logins per minutes , as Caddy is the first receiving the traffic and can get the status code already.
in other word, I need to have prometheus query for every request have 200 status code for that specific endpoint
2. Error messages and/or full log output:
none
3. Caddy version:
v2.5.2
4. How I installed and ran Caddy:
Docker-compose
a. System environment:
b. Command:
none