Mailing List Archive

Rsyslog insert DB problem
_______________________________________________
rsyslog mailing list
https://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.
Re: Rsyslog insert DB problem [ In reply to ]
_______________________________________________
rsyslog mailing list
https://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.
Rsyslog insert DB problem [ In reply to ]
_______________________________________________
rsyslog mailing list
https://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.
Re: Rsyslog insert DB problem [ In reply to ]
we would need to see a sample message that did not get written. you may also
want to look at the log messages of the database to see if it logged an error.

one possible reason would be if the msg field included a quote character in it,
but there are logs of other possible reasons.

David Lang

On Fri, 2 Jul 2021, Ozgur Kara wrote:

> Date: Fri, 02 Jul 2021 23:35:07 +0400
> From: Ozgur Kara <o@zgur.org>
> To: rsyslog-users <rsyslog@lists.adiscon.com>
> Cc: David Lang <david@lang.hm>
> Subject: Rsyslog insert DB problem
>
> Hello all,
>  
> I having a problem with rsyslog sql and need help.
> I want to write to a simple syslog log to SQL.
>  
> I added rsyslog.conf:
>  
> $ModLoad ommysql
>  
> $template SQLTPL, "INSERT INTO Log_Messages (receivedAt, deviceTime, facility, priority, fromHost, syslogTag, message) VALUES ('%timegenerated:::date-mysql%', '%timereported:::date-mysql%', %syslogfacility%, %syslogpriority%, '%HOSTNAME%',
> '%syslogtag%', '%msg%')",SQL
>  
> *.* :ommysql:localhost,devel_opennims,***USERNAME***,***PASSWORD***;SQLTPL
>  
> and i want contains "hoster" message select and write sql
>  
> :msg, contains, "hoster" :ommysql:10.100.100.10,testdb,admin,qwerty;SQLTPL
>  
> but when hoster log is created, rsyslog doesnt write it to  db on mysql, why do you think?
>  
> rsyslog version:
>  
> rsyslogd  8.1901.0
>  
> Please help,
> Regards
>  
> Ozgur
>
>
_______________________________________________
rsyslog mailing list
https://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.
Re: Rsyslog insert DB problem [ In reply to ]
_______________________________________________
rsyslog mailing list
https://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.