Skip to main content

RsyslogPseudonymizer is a plug-in module for Rsyslog based on Python which replaces personal identifiers in log messages by pseudonyms before they are written to log files. The pseudonym-mapping is only kept in RAM.

Project description

RsyslogPseudonymizer

RsyslogPseudonymizer is a plug-in module for Rsyslog based on Python which replaces personal identifiers in log messages by pseudonyms before they are written to log files. The pseudonym-mapping is only kept in RAM.

Test and build

Run the following commands:

virtualenv -p "$(which python3)" ./venv
source ./venv/bin/activate
pip install -r dev_requirements.txt
tox
hatch clean
hatch build

Installation

In the absence of OS packages, some more steps are required. See the provided install.sh or run it as root (tested on Debian).

You should then configure your applications/services so that the logs are written only to Rsyslog.

If you use Systemd, you could configure it to forward received logs to Rsyslog. Then it would in general only be necessary to configure applications to only log to stdout/stderr so that Systemd handles the output. Configuration example:

/etc/systemd/journald.conf.d/forward_to_syslog.conf

[Journal]
# Keep log data only in memory, but forward journal log to (r)syslog
Storage=volatile
ForwardToSyslog=yes

# Reduce amount of logs stored in RAM somehow
MaxFileSec=1h
MaxRetentionSec=2days

Then: systemctl restart systemd-journald.service

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rsyslog-pseudonymizer, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size rsyslog_pseudonymizer-1.0.2-py3-none-any.whl (18.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size rsyslog_pseudonymizer-1.0.2.tar.gz (8.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page