Mailing List Archive

Variables as values for legacy configuration items
Hi,

Is it possible to use variables to define a legacy configuration item value?

I tried for example with forward port, and doesn't work:

set $.forwardPort = 514;

*.* @@syslogserver:$.forwardPort


on the debug log i see this:
0896.337077773:main Q:Reg/w0  :     ACTION 19
[builtin:omfwd:@@syslogserver:$.forwardPort]


So its not replacing the variable with the value.


Best regards,
Ricardo Esteves.
Re: Variables as values for legacy configuration items [ In reply to ]
No, it's not possible - intentionally. That would require rsyslog to
re-evaluate the port for every single message and close/open
connections as required. That would cause massive performance
degradation.

Rainer

El mié, 10 ago 2022 a las 13:42, Ricardo Esteves via rsyslog
(<rsyslog@lists.adiscon.com>) escribió:
>
> Hi,
>
> Is it possible to use variables to define a legacy configuration item value?
>
> I tried for example with forward port, and doesn't work:
>
> set $.forwardPort = 514;
>
> *.* @@syslogserver:$.forwardPort
>
>
> on the debug log i see this:
> 0896.337077773:main Q:Reg/w0 : ACTION 19
> [builtin:omfwd:@@syslogserver:$.forwardPort]
>
>
> So its not replacing the variable with the value.
>
>
> Best regards,
> Ricardo Esteves.
>
>
> _______________________________________________
> 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.