月度归档:2015年07月

rsyslog for mysql 表按月存放

$template StdSQLFormat,”insert into SystemEvents%$year%%$month% (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values (‘%msg%’, %syslogfacility%, ‘%fromhost-ip%’, %syslogpriority%, ‘%timereported:::date-mysql%’, ‘%timegenerated:::date-mysql%’, %iut%, ‘%syslogtag%’)”,SQL

$ModLoad ommysql.so
*.* :ommysql:127.0.0.1,rsyslogd,rsyslogd,xxxx;StdSQLFormat