logmonitor/etc/syslog-ng/templates/d_sql.template
2021-01-28 14:10:11 +02:00

22 lines
475 B
Plaintext

destination d_sql {
sql(
type(mysql)
host("SQL_HOST")
port("SQL_PORT")
username("SQL_USER")
password("SQL_PASSWORD")
database("SQL_DATABASE")
table("logs")
columns("host", "facility", "priority", "level", "tag", "fo", "program", "msg")
values("$HOST", "$FACILITY", "$PRIORITY", "$LEVEL", "$TAG","$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "$MSG")
indexes("fo", "host")
);
};
log {
source(s_local);
source(s_network);
destination(d_sql);
};