On Wed, 20 Jul 2016, JayJay Tack wrote:

Hello everyone,

I want to know if it possible that Rsyslog reads or accepts, (am not sure
of the right terminology to use) PostgresLogs and writes them to a database?
What I want to achieve is to write the logs to a database and then view
them via web browser using Adiscon Loganalyzer, I am currently viewing the,
I would say, Linux System Logs but I want to view the Postgres Logs.

I have read about a template that must be included in the rsyslog.conf but
I do not know how to create this template. I was thinking it has to be
related to the format of the Logs, E.g (Date, Time, Host, Port, Username
etc) but I am not sure what syntax to use.

the templates in rsyslog.conf have to do with outputting the message, not with reading the message

you would want to look at imfile to read the messages from a logfile (or look at the postgresql config to see if it can write it's logs directly to syslog)

You may also want to look at mmnormalize to parse the logs if you want to extract specific values.

I don't know anything about loganalyzer, so I can't help you with that.

David Lang
_______________________________________________
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