Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New metric "Matched Rules" #271

Open
matheusmattioli opened this issue Apr 29, 2024 · 2 comments
Open

New metric "Matched Rules" #271

matheusmattioli opened this issue Apr 29, 2024 · 2 comments

Comments

@matheusmattioli
Copy link

Hello!

In the README we have some metrics with the prefix waf_filter, but it stores only the rules that interrupted a transaction and the total interruptions captured, it is very useful, however, when we are tailoring/troubleshooting our internal configuration of Coraza, it's important to know all the rules triggered and analyzed by the WAF in a specific transaction. Because, in case of false positives, we could understand better what causes the blocking through analysis of the rules triggered. And, with the export of a metric to Prometheus, we also could identify all the matched rules through panels in dashboards like Grafana instead of logs.

I already wrote code to implement this new metric and tested it, could i submit a Pull Request?

@fzipi
Copy link
Member

fzipi commented Apr 29, 2024

Of course you can!

@jcchavezs
Copy link
Member

jcchavezs commented Jun 14, 2024

Hi @matheusmattioli thanks for coming by and apologies for not coming back to you before. I wonder if we truly need such metrics for troubleshooting. Audit logs will provide you such data so I am not sure about we truly needing to export it as metrics. As for the FP concern we willing to monitor the metrics on matched rules that can make sense but segregating them by transaction ID sounds like we can get that from audit logs (WIP in #263). WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants