Expose bouncer metrics through prometheus
Author: david-garcia-garciaCreated Jul 22, 2025Updated Sep 3, 2026
Labelsneeds/triageneeds/kind
What would you like to be added?
For feature request please pick a kind label by removing <!-- --> that wrap the example lines below
/kind enhancement
Current prometheus endpoint for the LAPI does not provide detailed information about bouncer behaviour, only received requests by bouncer:
cs_lapi_bouncer_requests_total{bouncer="crowdsec",method="GET",route="/v1/decisions/stream"} 59
cs_lapi_bouncer_requests_total{bouncer="[email protected]",method="GET",route="/v1/decisions/stream"} 638Why is this needed?
Considering that the LAPI is already receiving detailed metrics from bouncers specific to blocked requests, exposing this through Prometheus can be very useful to:
- Analyze/Track bouncer behavior
- Create alerts that determine if a bouncer is working (i.e. bounce rate < threshold)
Second item here is critical for availability and monitoring. It is very difficult right now to automatically asses if a bouncer is or not working to generate availability alerts.
This would also fix https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/issues/171
Source: crowdsecurity/crowdsec