[syslog-ng] Rewrite set var value with tag?

Faine, Mark R. (MSFC-IS40)[NICS] mark.faine at nasa.gov
Thu Jan 16 21:24:27 UTC 2020


Is it possible to do something like:

rewrite {
  set-tag("bar");
};

And then use a rewrite to set the value of a variable to the value of the tag

rewrite {
  set("${TAGS}", value("foo"));
};


I need to set a value that I've determined in a log path at the top of the file in several log paths that occur after.  It looks the scope for variables is at the log path level so that doesn't help me.  I'm also trying to avoid nesting all of the other log paths inside of the top log path where I determine the value.

I'm trying to avoid:

log{
  ...
  filter{
    ...
    tags("bar");
    rewrite{
      set("bar", "foo");
   };
  };
};
log{...
log{...


Thanks,
-Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20200116/fba15813/attachment.html>


More information about the syslog-ng mailing list