Repository navigation
IIS and JSON access logs; big and idle files - #5
Merged
Merged
Conversation
Lines are recognised per line: Apache/nginx text, JSON (nginx escape=json, Caddy, Traefik), and IIS W3C with the columns from each file's #Fields: header, tracked per file by the tailer and looked up backwards when the daemon starts mid-file. The same requests in all three formats get the same decisions (bench/formats.py, now part of bench/run.sh). Wildcard matches idle for a day are skipped or let go (IIS keeps every daily log) and resumed where they were if written again. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJFY41846T15QqxmGW2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for more log formats. jevban detects the format line by line, so one daemon can follow a mix.
Formats
u_ex*.log), with any set of fields. The columns come from each file's#Fields:header:log_format ... escape=jsonwith its usual variable names;ClientAddrwith a port).Every format fills the same entry and is escaped the way Apache escapes
%r, so signatures, rules and the model see identical input. The same 200,000 requests written as Apache, nginx JSON and IIS get identical decisions: 2,785 suspicious, 1,640 strikes and 1,630 bans in each.bench/run.shnow checks this every run (bench/formats.py).Parse speed, one core:
Big and idle files (measured with 1 GB logs)
#Fields:header is a gigabyte back at the top, and new lines still parse.--testreplay of 1 GB (6.4M lines): 89 s, 9 MB peak RSS.Unchanged
mainon every corpus.Unit tests: 142 checks, 0 failed (17 new). Iteration notes are in
bench/results/iter6-formats/README.md.This branch is independent of FMXExpress/JevBan#4 and can be merged before or after it.
Generated by Claude Code