On Mon, 9 Sep 2013, Erik Steffl wrote:
Using a property in template (after action(type="mmjsonparse") succeeds):
property(name="$!key!anotherKey")
Is there a way to specify default value (just a string constant, nothing
dynamic) that should be used in case incoming messages do not have
$key!anotherKey element?
not directly, but you can do:
if isempty($!key!anotherKey) then $!key!anotherKey=default
David Lang
Looking at http://www.rsyslog.com/doc/property_replacer.html I see there is
legacy mandatory-field option which seems sort of relevant/related but I
don't see how to use it (what would the velue be?) plus since it's legacy
option it's likely not a goo d idea to use it.
_______________________________________________
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.