mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-11-16 13:15:47 +00:00
remove unneeded (default) include, improved grp-regex (with negative lookahead for msg and remote_ip tokens)
This commit is contained in:
parent
e5fdceffae
commit
533bbd93f7
1 changed files with 2 additions and 7 deletions
|
|
@ -8,11 +8,6 @@
|
|||
# logtype = json (structured JSON format)
|
||||
#
|
||||
|
||||
[INCLUDES]
|
||||
|
||||
# Load customizations if any available
|
||||
after = authelia.local
|
||||
|
||||
[Definition]
|
||||
|
||||
# Log format: "file" (standard key-value text) or "json"
|
||||
|
|
@ -27,12 +22,12 @@ journalmatch = _SYSTEMD_UNIT=authelia.service
|
|||
[lt_file]
|
||||
|
||||
datepattern = {^LN-BEG}time="{DATE}"\s+
|
||||
grp = (?:\w+=("(?:[^\\"]|\\.)*"|\S+)\s+)*
|
||||
grp = (?:(?!msg|remote_ip)\w+=("(?:[^\\"]|\\.)*"|\S+)\s+)*
|
||||
failregex = ^\s*%(grp)smsg="Unsuccessful \S+ authentication attempt by user '<F-USER>(?:[^\\']|\\.)*</F-USER>'[^"]*" %(grp)sremote_ip=<ADDR>
|
||||
|
||||
[lt_json]
|
||||
|
||||
datepattern = "time":"{DATE}"
|
||||
grp = (?:"\w+":("(?:[^\\"]|\\.)*"|\S+),\s*)*
|
||||
grp = (?:"(?!msg|remote_ip)\w+":("(?:[^\\"]|\\.)*"|\S+),\s*)*
|
||||
failregex = ^{%(grp)s"msg":"Unsuccessful \S+ authentication attempt by user '<F-USER>(?:[^\\']|\\.)*</F-USER>'[^"]*",%(grp)s"remote_ip":"<ADDR>"
|
||||
^{%(grp)s"remote_ip":"<ADDR>",%(grp)s"msg":"Unsuccessful \S+ authentication attempt by user '<F-USER>(?:[^\\']|\\.)*</F-USER>'[^"]*"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue