mirror of https://github.com/fail2ban/fail2ban
amend, obtain argument namespace before we'll use it
parent
b2352f113e
commit
6b56259f9a
|
@ -141,6 +141,11 @@ class FilterSystemd(JournalFilter): # pragma: systemd no cover
|
||||||
elif rotated:
|
elif rotated:
|
||||||
args['flags'] = journal.SYSTEM_ONLY
|
args['flags'] = journal.SYSTEM_ONLY
|
||||||
|
|
||||||
|
try:
|
||||||
|
args['namespace'] = kwargs.pop('namespace')
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
# To avoid monitoring rotated logs, as prevention against "Too many open files",
|
# To avoid monitoring rotated logs, as prevention against "Too many open files",
|
||||||
# set the files to system.journal and user-*.journal (without rotated *@*.journal):
|
# set the files to system.journal and user-*.journal (without rotated *@*.journal):
|
||||||
if not rotated and not args.get('files') and not args.get('namespace'):
|
if not rotated and not args.get('files') and not args.get('namespace'):
|
||||||
|
@ -152,11 +157,6 @@ class FilterSystemd(JournalFilter): # pragma: systemd no cover
|
||||||
else:
|
else:
|
||||||
args['files'] = None
|
args['files'] = None
|
||||||
|
|
||||||
try:
|
|
||||||
args['namespace'] = kwargs.pop('namespace')
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue