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

[RFE]: JSON parsing support in filter configuration for structured log output? #3526

Open
ericswpark opened this issue Jun 11, 2023 · 1 comment

Comments

@ericswpark
Copy link

ericswpark commented Jun 11, 2023

Feature request type

Are there any plans to implement JSON parsing support in order to support server software that emit structured logs?

Description

I was trying to write some configuration files so that Fail2ban would work with the Caddy webserver (which emits JSON access logs), but realized matching stuff within JSON using regex might be a bad idea. Off the top of my head the JSON structure might change around causing the filter to break, or match incorrect host addresses, etc.

Considered alternatives

Use something like jq to pre-process and extract needed data (possibly issue #2992?)

Any additional information

Issues (for specific server software):

I haven't found a general issue/RFE for JSON parsing via searching, but please let me know if there is one and this is a duplicate and I will close it.

@KhaaL
Copy link

KhaaL commented Dec 30, 2023

I'd be really happy to have this as a native functionality. Right now, our only option is to rely on hacks where Caddylogs are RegEx'd in order to be parsable by fail2ban.

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

No branches or pull requests

2 participants