This module provides a logging handler for sending salt logs to MongoDB
In the salt configuration file (e.g. /etc/salt/{master,minion}):
log4mongo_handler:
host: mongodb_host
port: 27017
database_name: logs
collection: salt_logs
username: logging
password: reindeerflotilla
write_concern: 0
log_level: warning
If not set, the log_level will be set to the level defined in the global configuration file setting.
Inspiration
This work was inspired by the Salt logging handlers for LogStash and Sentry and by the log4mongo Python implementation.