Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Add log format definition for perflogjson #128

Closed
theseion opened this issue Aug 1, 2022 · 5 comments · Fixed by #145
Closed

Add log format definition for perflogjson #128

theseion opened this issue Aug 1, 2022 · 5 comments · Fixed by #145

Comments

@theseion
Copy link
Contributor

theseion commented Aug 1, 2022

We currently use a custom log format named perlogjson for the performance log of Apache. This log format doesn't exist though. It was introduced in cfe220b but without a format definition.

@fzipi
Copy link
Member

fzipi commented Sep 16, 2022

I don't think this log format makes any sense for us. Probably this is a leftover from a different installation from the vshn team.

So I'm closing this one as won't fix.

@fzipi fzipi added the wontfix label Sep 16, 2022
@fzipi fzipi closed this as completed Sep 16, 2022
@dune73
Copy link
Member

dune73 commented Sep 17, 2022

I suspect it's been a VSHN->JSON version of the perflog I'm advocating in my ModSec->Apache tutorial here: https://www.netnea.com/cms/apache-tutorial-6_embedding-modsecurity/#step_5_creating_the_base_configuration

This is hardly used in production and nothing wrong with removing it.

@theseion
Copy link
Contributor Author

Thanks for the hint!

@dune73
Copy link
Member

dune73 commented Sep 17, 2022

The one thing you may want to make the Apache default is the extended format that I use throughout my tutorials:

LogFormat "%h %{GEOIP_COUNTRY_CODE}e %u [%{%Y-%m-%d %H:%M:%S}t.%{usec_frac}t] \"%r\" %>s %b \
\"%{Referer}i\" \"%{User-Agent}i\" \"%{Content-Type}i\" %{remote}p %v %A %p %R \
%{BALANCER_WORKER_ROUTE}e %X \"%{cookie}n\" %{UNIQUE_ID}e %{SSL_PROTOCOL}x %{SSL_CIPHER}x \
%I %O %{ratio}n%% %D %{ModSecTimeIn}e %{ApplicationTime}e %{ModSecTimeOut}e \
%{ModSecAnomalyScoreInPLs}e %{ModSecAnomalyScoreOutPLs}e \
%{ModSecAnomalyScoreIn}e %{ModSecAnomalyScoreOut}e" extended

Explained and spiced up with aliases to extract the individual columns in this tutorial: https://www.netnea.com/cms/apache-tutorial-5_extending-access-log/#step_4_configuring_the_new,_extended_log_format

The ModSec variables are defined here: https://www.netnea.com/cms/apache-tutorial-6_embedding-modsecurity/#step_5_creating_the_base_configuration
-> rules in the 90K range

@theseion
Copy link
Contributor Author

Thanks. I've opened an issue: coreruleset/modsecurity-crs-docker#97.

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

Successfully merging a pull request may close this issue.

3 participants