[syslog-ng] Syslog-ng and External variables

Robert Blayzor rblayzor.bulk at inoc.net
Mon Aug 29 15:35:18 CEST 2016


On Aug 29, 2016, at 9:22 AM, Fabien Wernli <wernli at in2p3.fr> wrote:
> 
> The backticks replace content, so you end up with a literal in your config.
> Try this instead:
> 
>    rewrite r_host { set("`HOSTNAME`", value("HOST")); };


That certainly fixes the config from complaining, but I now just get an empty string; for which syslog-ng replaces with the hosts IP instead.

I’m just trying to re-write each messages host with the hostname of the current server.




More information about the syslog-ng mailing list