Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
simple logging config file for privacyIDEA to send to logstash
# /etc/privacyidea/logging_logstash_simple.cfg
[handlers]
keys=logstash_async
[handler_logstash_async]
# https://python-logstash-async.readthedocs.io/en/latest/usage.html#usage-with-logging-file-config
class=logstash_async.handler.AsynchronousLogstashHandler
level=INFO
args=('%(host)s', %(port)s,'%(database_path)s')
host=192.168.56.150
port=5959
database_path=logstash_async_cache.sqlite
[loggers]
keys=privacyidea,audit
[logger_privacyidea]
handlers=logstash_async
qualname=privacyidea
level=DEBUG
[logger_audit]
handlers=logstash_async
qualname=pi-audit
level=DEBUG
# /etc/privacyidea/logging_logstash_simple.yml
handlers:
logstash_async:
class: logstash_async.handler.AsynchronousLogstashHandler
host: 192.168.56.150
port: 5959
database_path: 'logstash_async_cache.sqlite'
level: INFO
loggers:
privacyidea:
handlers:
- logstash_async
level: DEBUG
pi-audit:
handlers:
- logstash_async
level: DEBUG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment