I'm using rsyslog 7.4.7 on RHEL 7 and have an issue creating a filter for mysql 
logging.

What I want to achieve is to have a remote hosts in certain networks logging to 
mysql.
I'm using the syslog viewer plugin with cacti and need to have a custom 
template applied.

Here is the configuration that I've tried so far but I do not get any log 
entries in the database.

template (
        name="cacti_syslog" type="string" option.sql="on"
        string=""INSERT INTO syslog_incoming(facility, priority, date, time, 
host, message) values (%syslogfacility%, %syslogpriority%, 
'%timereported:::date-mysql%', 'timereported:::date-mysql%', '%HOSTNAME%', 
'%msg%')"
)

if (
        $fromhost-ip startswith '192.168' or
        $fromhost-ip startswith '10.4'
) then
        action (
                type="ommysql" server="localhost" db="cacti" uid="cacti" 
pwd="cactipassword" template="cacti_syslog")
       )

& stop
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to