setup and configuration information
parent
018441b27d
commit
98be1c89db
|
@ -33,3 +33,9 @@ Interesting [filtering entries](https://www.freedesktop.org/software/systemd/man
|
||||||
* `_PID`: process ID of the systemd unit’s main process
|
* `_PID`: process ID of the systemd unit’s main process
|
||||||
* `MESSAGE`: the actual message of the log entry
|
* `MESSAGE`: the actual message of the log entry
|
||||||
* `__REALTIME_TIMESTAMP`: Python `datetime` of the log entry, formatted as: `YYYY-MM-DD HH:MM:SS:µµµµµµ`
|
* `__REALTIME_TIMESTAMP`: Python `datetime` of the log entry, formatted as: `YYYY-MM-DD HH:MM:SS:µµµµµµ`
|
||||||
|
|
||||||
|
The `/etc/pyruse` directory is where system-specific files are looked-for:
|
||||||
|
* the `pyruse.json` file that contains the configuration,
|
||||||
|
* the `pyruse/actions` and `pyruse/filters` subfolders, which may contain additional actions and filters.
|
||||||
|
|
||||||
|
Instead of using `/etc/pyruse`, an alternate directory may be specified with the `PYRUSE_EXTRA` environment variable.
|
||||||
|
|
1
TODO.md
1
TODO.md
|
@ -1,5 +1,6 @@
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
* Improve documentation, especially on the contents of `pyruse.json`.
|
||||||
* Maybe switch from storing the daily journal in a file, to storing it in a database.
|
* Maybe switch from storing the daily journal in a file, to storing it in a database.
|
||||||
* Maybe switch from Step.run() recursion to Step.run()-in-a-loop to avoid too-deep call stacks.
|
* Maybe switch from Step.run() recursion to Step.run()-in-a-loop to avoid too-deep call stacks.
|
||||||
* Eventually make the code more elegant, as I learn more about Python…
|
* Eventually make the code more elegant, as I learn more about Python…
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
from distutils.core import setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='pyruse',
|
||||||
|
version='1.0',
|
||||||
|
license='GPL-3',
|
||||||
|
description='Route systemd-journal logs to filters and actions (ban, report…)',
|
||||||
|
long_description='''
|
||||||
|
================
|
||||||
|
Python peruser of systemd-journal
|
||||||
|
================
|
||||||
|
|
||||||
|
This program is intended to be used as a lightweight replacement for both epylog and fail2ban.
|
||||||
|
|
||||||
|
The wanted features are these:
|
||||||
|
|
||||||
|
* Peruse all log entries from systemd’s journal, and only those (ie: no log files).
|
||||||
|
* Passively wait on new entries; no active polling.
|
||||||
|
* Filter-out uninteresting log lines according to the settings.
|
||||||
|
* Act on matches in the journal, with some pre-defined actions.
|
||||||
|
* Create a daily report with 2 parts:
|
||||||
|
- events of interest (according to the settings),
|
||||||
|
- and other non-filtered-out log entries.
|
||||||
|
* Send an immediate email when something important happens (according to the settings).
|
||||||
|
''',
|
||||||
|
author='Yves G.',
|
||||||
|
author_email='theYinYeti@yalis.fr',
|
||||||
|
maintainer='Yves G.',
|
||||||
|
maintainer_email='theYinYeti@yalis.fr',
|
||||||
|
url='https://yalis.fr/git/yves/pyruse',
|
||||||
|
download_url='https://yalis.fr/git/yves/pyruse',
|
||||||
|
packages=['pyruse', 'pyruse.actions', 'pyruse.filters'],
|
||||||
|
)
|
Loading…
Reference in New Issue