I'm currently using rsyslog to send all my syslogs to a SQL server and it works fine. But one of my computer sends it to an diffrent format. How can I set an exception for a given IP address?
Here is what I got now:
$template sysMysql,"INSERT INTO logs (host,facility, priority,level,tag,datetime,program,msg) VALUES('%HOSTNAME%','%syslogfacility-text%','%syslogpriority-text%','%syslogseverity%','%syslogtag%','%timereported:::date-mysql%','%programname%', '%msg%')", SQL
*.*;authpriv.none;mail.none;cron.none >127.0.0.1,centreon_syslog,centreon_syslog,*****;sysMysql
And I want to change that template just for one IP Address.
Okay my bad, I found something here: answer But to be complete, here what I had to do:
$template sysMysqlUcopia,"INSERT INTO logs (host,facility, priority,level,tag,datetime,program,msg) VALUES('portailcaptif','%syslogfacility-text%','%syslogpriority-text%','%syslogseverity%','%syslogtag%','%timereported:::date-mysql%','%programname%', '%msg%')", SQL
$template sysMysql,"INSERT INTO logs (host,facility, priority,level,tag,datetime,program,msg) VALUES('%HOSTNAME%','%syslogfacility-text%','%syslogpriority-text%','%syslogseverity%','%syslogtag%','%timereported:::date-mysql%','%programname%', '%msg%')", SQL
:fromhost-ip, isequal, "172.17.97.60" >127.0.0.1,centreon_syslog,centreon_syslog,*****;sysMysqlUcopia
& ~
*.*;authpriv.none;mail.none;cron.none >127.0.0.1,centreon_syslog,centreon_syslog,*****;sysMysql