[syslog-ng] Host variable substitution in syslog-ng.conf include statement

Broome, John P - OASAM OCIO CTR Broome.John.P at dol.gov
Tue Jan 3 15:21:21 UTC 2017


I am supporting a large number of syslog-ng hosts and we manage the configuration files with gitlab.  I have been trying to figure out how to reference a variable based on hostname in the syslog-ng.conf file on each machine.  For example, I would like to be able to have an include statement based on hostname - this would allow our common repository to have an exception set of filters/rules for each host but to use the exact same syslog-ng.conf file everywhere:

################################## syslog-ng.conf ###########################################
@version: 3.2
Include "`hostname`.conf"
...

Is there a way to accomplish this in version 3.2 (if not, does it appear in a later version)?
We are restricted to EPEL6 included versions of syslog-ng, so that's why we're at version 3.2


-           JB


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


More information about the syslog-ng mailing list