Just to add to David's suggestion, here are some examples from one of my 
configs:

  template(name="s_relay_time" type="list") {
    property(name="timegenerated" dateFormat="rfc5424")
  }
  template(name="s_relay_utime" type="list") {
    property(name="timegenerated" dateFormat="unixtimestamp")
    constant(value=".")
    property(name="timegenerated" dateFormat="subseconds")
  }

Then use exec_template() to populate the variables/properties you like:

  set $!relay_time = exec_template("s_relay_time");
  set $!relay_utime = exec_template("s_relay_utime");

--
Dave Caplinger

> On Dec 1, 2016, at 3:22 PM, David Lang <da...@lang.hm> wrote:
>
> On Thu, 1 Dec 2016, mosto...@gmail.com wrote:
>
>> Thanks David. It helped (sadly it arrived 2 hours late :P)
>>
>> I'm now dealing setting a variable with timestamp:::date-rfc5424 format.
>
> the only way to do that is with a template.
>
> 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.
>
> Confidentiality Notice: The content of this communication, along with any 
> attachments, is covered by federal and state law governing electronic 
> communications and may contain confidential and legally privileged 
> information. If the reader of this message is not the intended recipient, you 
> are hereby notified that any dissemination, distribution, use or copying of 
> the information contained herein is strictly prohibited. If you have received 
> this communication in error, please immediately contact us by telephone at 
> 402.361.3000 or e-mail secur...@solutionary.com.
>
> Copyright 2000-2016 NTT Security (US) Inc., a wholly-owned subsidiary of NTT 
> Group. All rights reserved. ActiveGuard and Solutionary are registered 
> trademarks and NTT Security is a trademark of NTT Security (US) Inc. 
> Solutionary, the ActiveGuard logo icon, and the Solutionary logo icon are 
> registered service marks of NTT Security (US) Inc.
>


Confidentiality Notice: The content of this communication, along with any 
attachments, is covered by federal and state law governing electronic 
communications and may contain confidential and legally privileged information. 
If the reader of this message is not the intended recipient, you are hereby 
notified that any dissemination, distribution, use or copying of the 
information contained herein is strictly prohibited. If you have received this 
communication in error, please immediately contact us by telephone at 
402.361.3000 or e-mail secur...@solutionary.com.

Copyright 2000-2016 NTT Security (US) Inc., a wholly-owned subsidiary of NTT 
Group. All rights reserved. ActiveGuard and Solutionary are registered 
trademarks and NTT Security is a trademark of NTT Security (US) Inc. 
Solutionary, the ActiveGuard logo icon, and the Solutionary logo icon are 
registered service marks of NTT Security (US) Inc.

_______________________________________________
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