You should be using %$NOW%, and %$YEAR%.
The properties need to be enclosed in %'s, and the date/time ones start with $.
Cheers!
Robert
> Date: Fri, 6 Sep 2013 21:14:29 -0700
> From: [email protected]
> To: [email protected]
> Subject: [rsyslog] omfile, DynaFile and now, year etc. properties
>
> Getting **INVALID PROPERTY NAME** when using time related properties in
> dynamically created filename.
>
> Using the properties as listed on
> http://www.rsyslog.com/doc/property_replacer.html (is there a more
> current list?)
>
> Action:
>
> action(type="omfile" DynaFile="jsonFilename")
>
> Dynamic file name template:
>
> template(name="jsonFilename" type="list") {
> constant(value="/var/log/yummly/")
> property(name="$!yummlyLogOrigin!supportLevel")
> constant(value="/")
> ...
> property(name="year")
> constant(value="/json.log")
> }
>
> The filename created is:
>
> /var/log/yummly/dev/.../**INVALID PROPERTY NAME**
>
> Using "now" or "year" property fails. Using other properties both from
> json message or rsyslog properties like "pri-text" works.
>
> Debug run does not reveal any details (that I would understand):
>
> 6843.275161135:7f47e5f4d700: rainerscript: var '$parsesuccess': 'OK'
> 6843.275182497:7f47e5f4d700: batch: item 0: expr eval: 1
> 6843.275198724:7f47e5f4d700: scriptExec: batch of 1 elements, active
> 0x7f47e0000900, active[0]:1
> 6843.275213594:7f47e5f4d700: ACTION 0xf6c800
> [action(type="builtin:omfile" ...)]
> 6843.275304911:7f47e5f4d700: RRRR: execAct [builtin:omfile]: batch of 1
> elements, active 0x7f47e0000900
> 6843.275463389:7f47e5f4d700: Called action(NotAllMark), processing
> batch[0] via 'builtin:omfile'
> 6843.275479600:7f47e5f4d700: Called action(Batch), logging to builtin:omfile
> 6843.275504004:7f47e5f4d700: AAAA: next JSONPath elt: 'yummlyLogOrigin'
> 6843.275527397:7f47e5f4d700: AAAA: next JSONPath elt: 'yummlyLogOrigin'
> 6843.275545049:7f47e5f4d700: AAAA: next JSONPath elt: 'yummlyLogOrigin'
> 6843.275561609:7f47e5f4d700: AAAA: next JSONPath elt: 'yummlyLogOrigin'
> 6843.275578498:7f47e5f4d700: AAAA: next JSONPath elt: 'yummlyLogOrigin'
> 6843.275657415:7f47e5f4d700: invalid property id: '0'
> 6843.275850010:7f47e5f4d700: submitBatch: enter, nElem 1
> 6843.275866336:7f47e5f4d700: tryDoAction 0xf6c800, pnElem 1, nElem 1
> 6843.275881844:7f47e5f4d700: Action 0xf6c800 transitioned to state: itx
> 6843.275896659:7f47e5f4d700: entering actionCalldoAction(), state: itx
> 6843.275911972:7f47e5f4d700: file to log to:
> /var/log/yummly/dev/erikTestSytem/erikGazelle/madeUpRole/logger/**INVALID
> PROPERTY
> NAME**
>
> Note that five yummlyLogOrigin that are mentioned in debug output are
> successfully used (see five elements in the file it tries to log to
> which are 'dev/erikTestSytem/erikGazelle/madeUpRole/logger').
>
> any ideas what's going on?
>
> thanks!
>
> erik
> _______________________________________________
> 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.
_______________________________________________
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.