-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathrsyslog-echofish.conf
17 lines (14 loc) · 1.3 KB
/
rsyslog-echofish.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# sql + rules for rsyslog integration with Echofish
# Include this into your rsyslog.conf or place under /etc/rsyslog.d/
# Load rsyslog MySQL plugin
$ModLoad ommysql.so
# Generic template
$template dbFormat,"INSERT INTO archive_bh (host, facility, priority, level, received_ts, program, msg,pid,tag) VALUES ( '%fromhost-ip%', '%syslogfacility%', '%syslogpriority%','%syslogseverity%', '%timereported:::date-mysql%', TRIM('%programname%'), TRIM('%msg%'),'%procid%', '%syslogtag%' );\n",sql
# Specific template for loghost (127.0.0.1)
# To avoid logging as 127.0.0.1 uncomment the following lines and change A.B.C.D to the loghost's IP addr.
#$template dbFormatLocal,"INSERT INTO archive_bh (host, facility, priority, level, received_ts, program, msg,pid,tag) VALUES ( 'A.B.C.D', '%syslogfacility%', '%syslogpriority%','%syslogseverity%', '%timereported:::date-mysql%', TRIM('%programname%'), TRIM('%msg%'),'%procid%', '%syslogtag%' );\n",sql
#if $fromhost-ip != '127.0.0.1' then :ommysql:127.0.0.1,ETS_echofish,echofish,{{{echofish-pass-here}}};dbFormat
#& ~
#if $fromhost-ip == '127.0.0.1' then :ommysql:127.0.0.1,ETS_echofish,echofish,{{{echofish-pass-here}}};dbFormatLocal
# If you enabled loghost template above, comment-out the following line.
*.* :ommysql:127.0.0.1,ETS_echofish,echofish,{{{echofish-pass-here}}};dbFormat