No. Not like this. Input is created just once while properties are parsed from each so you can't set a static value to a dynamic field.

If you want to use the property from the message, you need to set your custom property (like $.mytag) to the value of $hostname and then use it in the template for your desired output action.

On 22.05.2024 08:13, Tan Mientras via rsyslog wrote:
Hi

Is it possible to get imfile input value from a variable/property?

Something like:
input( type="imfile"
        ruleset="syslog"
        addMetadata="on"
        file="/var/log/apache2/*.log"
*       tag="$hostname"*
     )
_______________________________________________
rsyslog mailing list
https://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
https://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