mirror of https://github.com/fail2ban/fail2ban
filter.d/recidive.conf: conditional RE depending on logtype (for file or journal)
parent
0b63fc312d
commit
dd3c78ecab
|
@ -19,7 +19,7 @@
|
|||
# common.local
|
||||
before = common.conf
|
||||
|
||||
[Definition]
|
||||
[DEFAULT]
|
||||
|
||||
_daemon = (?:fail2ban(?:-server|\.actions)\s*)
|
||||
|
||||
|
@ -27,8 +27,21 @@ _daemon = (?:fail2ban(?:-server|\.actions)\s*)
|
|||
# this filter 'recidive', or supply another name with `filter = recidive[_jailname="jail"]`
|
||||
_jailname = recidive
|
||||
|
||||
failregex = ^%(__prefix_line)s(?:\s*fail2ban\.actions\s*%(__pid_re)s?:\s+)?NOTICE\s+\[(?!%(_jailname)s\])(?:.*)\]\s+Ban\s+<HOST>\s*$
|
||||
|
||||
[lt_short]
|
||||
_daemon = (?:fail2ban(?:-server|\.actions)?\s*)
|
||||
failregex = ^%(__prefix_line)s(?:\s*fail2ban(?:\.actions)?\s*%(__pid_re)s?:\s+)?(?:NOTICE\s+)?\[(?!%(_jailname)s\])(?:.*)\]\s+Ban\s+<HOST>\s*$
|
||||
|
||||
[lt_journal]
|
||||
_daemon = <lt_short/_daemon>
|
||||
failregex = <lt_short/failregex>
|
||||
|
||||
[Definition]
|
||||
|
||||
_daemon = <lt_<logtype>/_daemon>
|
||||
failregex = <lt_<logtype>/failregex>
|
||||
|
||||
datepattern = ^{DATE}
|
||||
|
||||
ignoreregex =
|
||||
|
|
Loading…
Reference in New Issue