Active bans with Prometheus

Hi, I have set up crowdsec with Prometheus metrics and it is working fine. I am trying to understand how to monitor active bans using the exposed Prometheus metrics. From what I understand, I can use cs_active_decisions which shows a gauge per scenario and cs_alerts which also is a gauge of the number of alerts (excluding CAPI). But I don't understand the values of these gauges, what do they represent ? For example, I have this metrics exposed cs_active_decisions{action="ban",origin="CAPI",reason="crowdsecurity/http-admin-interface-probing"} 320 but using cscli decisions list there are only two bans actives for this scenario. How to interpret the number 320 ? Thanks for your help !
3 Replies
CrowdSec
CrowdSec8mo ago
Important Information
This post has been marked as resolved. If this is a mistake please press the red button below or type /unresolve
© Created By WhyAydan for CrowdSec ❤️
cyberhippo
cyberhippoOP8mo ago
I think that by formulating this post I got the answer I was looking for. I was looking for metrics originating from my local crowdsec and not from CAPI so I filtered the metric cs_active_decisions on the origin and the numbers are matching with the results from cscli decisions list. /resolve
CrowdSec
CrowdSec8mo ago
Resolving Active bans with Prometheus This has now been resolved. If you think this is a mistake please run /unresolve

Did you find this page helpful?