Skip to content

Instantly share code, notes, and snippets.

@idefux
Last active August 29, 2015 14:23
Show Gist options
  • Save idefux/6c1f08d71fd09938a903 to your computer and use it in GitHub Desktop.
Save idefux/6c1f08d71fd09938a903 to your computer and use it in GitHub Desktop.
rsyslog to mysql on debian 8, table SystemEvents
# You need to create tables "SystemEvents" and "SystemEventsProperties"
mysql -u root -p < /usr/share/dbconfig-common/data/rsyslog-mysql/install/mysql
# Likely you will get an error that there is no DB specified.
# One way to solve this editing the file /usr/share/dbconfig-common/data/rsyslog-mysql/install/mysql
nano /usr/share/dbconfig-common/data/rsyslog-mysql/install/mysql
# and adding the following line upfront:
CONNECT your-rsyslog-db;
# In your rsyslog.conf add the following lines:
$ModLoad ommysql
*.* ommmysql:<dbserver>,<dbname>,<dbuser>,<dbpass>
# e.g.
*.* ommysql:localhost,rsyslog,rsyslog,password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment