Afternoon all,
I have rsyslog sending all my messages into a mysql database and this
is working well. Now I want to start to split the remote messages via
hostname into separate tables in the database. I have created a new
table FaiEvents with the same schema as SystemEvents and also I have
created a config file with actions and template like so:
$template Fai-Event,"insert into FaiEvents \
(Message, Facility, FromHost, Priority, DeviceReportedTime,
ReceivedAt, InfoUnitID, SysLogTag)\
values ('%msg%',z,\
%syslogfacility%,\
'%HOSTNAME%',\
%syslogpriority%,\
'%timereported:::date-mysql%',\
'%timegenerated:::date-mysql%',\
%iut%,\
'%syslogtag%')",SQL
if $hostname == 'faiserver'\
then :ommysql:localhost,Syslog,rsyslog,********;Fai-Event
However rsyslog gives me the error:
rsyslogd: the last error occured in /etc/rsyslog.d/05-faiservers.conf,
line 13
which is the action line.
What variable should I be using to test for the hostname? Can I use a
regex here?
Any help appreciated!
Regards
Iain Conochie
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com