mirror of https://github.com/fail2ban/fail2ban
Add a note about `journalflags` options to `systemd-journal` backend
Also adds systemd backend configuration examples to jail.conf(5) Closes #2696pull/2842/head^2^2
parent
4c2539856c
commit
f518d42c59
|
@ -113,7 +113,9 @@ class _f2bOptParser(OptionParser):
|
|||
LOG:
|
||||
string a string representing a log line
|
||||
filename path to a log file (/var/log/auth.log)
|
||||
"systemd-journal" search systemd journal (systemd-python required)
|
||||
"systemd-journal" search systemd journal. Optionally specify
|
||||
`systemd-journal[journalflags=X]` to determine
|
||||
which journals are used (systemd-python required)
|
||||
|
||||
REGEX:
|
||||
string a string representing a 'failregex'
|
||||
|
|
|
@ -298,7 +298,14 @@ requires Gamin (a file alteration monitor) to be installed. If Gamin is not inst
|
|||
uses a polling algorithm which does not require external libraries.
|
||||
.TP
|
||||
.B systemd
|
||||
uses systemd python library to access the systemd journal. Specifying \fBlogpath\fR is not valid for this backend and instead utilises \fBjournalmatch\fR from the jails associated filter config.
|
||||
uses systemd python library to access the systemd journal. Specifying \fBlogpath\fR is not valid for this backend and instead utilises \fBjournalmatch\fR from the jails associated filter config. Multiple systemd-specific flags can be passed to the backend, including \fBjournalpath\fR and \fBjournalfiles\fR, to explicitly set the path to a directory or set of files. \fBjournalflags\fR, which by default is 4 and excludes user session files, can be set to include them with \fBjournalflags=1\fR, see the python-systemd documentation for other settings and further details. Examples:
|
||||
.PP
|
||||
.RS
|
||||
.nf
|
||||
backend = systemd[journalpath=/run/log/journal/machine-1]
|
||||
backend = systemd[journalfiles="/path/to/system.journal, /path/to/user.journal"]
|
||||
backend = systemd[journalflags=1]
|
||||
.fi
|
||||
|
||||
.SS Actions
|
||||
Each jail can be configured with only a single filter, but may have multiple actions. By default, the name of a action is the action filename, and in the case of Python actions, the ".py" file extension is stripped. Where multiple of the same action are to be used, the \fBactname\fR option can be assigned to the action to avoid duplication e.g.:
|
||||
|
|
Loading…
Reference in New Issue