[syslog-ng] Setting and using variables

Fabien Wernli wernli at in2p3.fr
Mon Mar 25 08:38:31 UTC 2019


Hi Mark,

On Fri, Mar 22, 2019 at 01:37:29PM +0000, Faine, Mark R. (MSFC-IS40)[NICS] wrote:
> Is there a way to set variables in syslog-ng?

You can set arbitrary variables or tags using a rewrite:

    rewrite r_my_tags_and_vars {
      set-tag('foo');
      set('foo', value('bar'));
    };

In your particular example, you could also use the existing FILE_NAME macro.

Cheers



More information about the syslog-ng mailing list