It came in with blocks and scl support. So if your version has support for the system driver it will support this as well. My memories are vague with 3.2. Environment variables are resolved at parsing time and should work like this: Template("template ‘envvar‘") It works as if the environment variable was right there in the config file. On Sep 21, 2014 3:14 PM, <jetjnkr@gmail.com> wrote:
Balazs,
Thanks, do you have any examples in using the backtick it in a message template? Do you have to assign it to a config variable in a "define" first?
How much 'earlier' versions of syslog-ng will this work (e.g. before 3.2 ?)
Jim.
From: Balazs Scheidler <bazsi77@gmail.com> Subject: Re: [syslog-ng] Injecting environment variables? To: "Syslog-ng users' and developers' mailing list" <syslog-ng@lists.balabit.hu>, wernli@in2p3.fr Message-ID: <
CAKcfE+ZKqqPnPOOSJek81eq_EPa7y3jUrPyKYH94jc3mxvPsmg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Earlier you could use the backtick env variable format.
This one is substituted at config parsing. On Sep 18, 2014 5:26 PM, "Fabien Wernli" <wernli@in2p3.fr> wrote:
Hi Jim,
As of version 3.5 you can use the `env` template function:
template("<$PRI> $DATE $HOST $MSG $(env <environment-variable>) \n") template_escape(no));
Cheers
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq