david at lang
Aug 13, 2012, 10:53 AM
Post #2 of 5
On Mon, 13 Aug 2012, Jerome Renard wrote:
> I need to get a UUID  for each log line processed by Rsyslog so I
> can send it along with the traditionnal log informations (facility,
> severity, message etc).
> I checked in the configuration system and I found nothing.
> My use case is the following : I need to send each log line to two
> different storage systems. However I need to identify them in Mysql
> and Postgres in parallel (the message is actually duplicated for
> totally different use cases/contexts). Using a UUID is perfect for my
> user case as I can check that a log line is available in both
> In case a UUID is not available in Rsyslog, I think I will need to
> write a plugin for this.
> I need to reuse the UUID when I send data to MySQL and PostgreSQL so I
> can get the following configuration:
> $ModLoad ommysql
> $ModLoad ompgsql
> $template sqlinsert,"insert into systemevents (EventID, Message)
> values('%UUID%', '%msg%');", SQL
> *.* :ommysql:127.0.0.1,rsyslog,rsyslog,rsyslog;sqlinsert
> *.* :ompgsql:127.0.0.1,rsyslog,rsyslog,rsyslog;sqlinsert
> I am afraid the only solution for me would be to add a new property
> which means (unless I am mistaken) patching Rsyslog's core, but I do
> not have much experience with Rsyslog and maybe I overlooked
> something. Am I correct ?
I don't believe that rsyslog provides this directly. I believe that you
would want to generate a strgen module to create the UUID.
rsyslog mailing list
What's up with rsyslog? Follow https://twitter.com/rgerhards