"Dan" == Dan Mahoney <dmahoney@isc.org> writes:
Dan> [2015-03-06T20:47:33.096495] WARNING: Your configuration uses a newly Dan> introduced reserved word as identifier, please use a different name or Dan> enclose it in quotes before upgrading; keyword='channel', Dan> config-version='3.3', version='3.4', filename='source confgen system', Dan> line='1:1' Dan> Error parsing source, source plugin channel not found in source confgen Dan> system at line 1, column 1: Dan> included from Dan> /usr/local/etc/syslog-ng.conf line 27, column 9 Dan> channel Dan> ^^^^^^^ That is expanded from system(). If you change your @version from 3.3 to 3.4, the config will work. Alternatively, you can replace system() with something that does not expand to a block using 3.4+ features. With syslog-ng 3.6, comes a system-expand tool (modules/system-source/system-expand) that can help you with that. Dan> Finally, I should probably ask -- since syslog-ng has the ability to tag Dan> your config files with a given version, is there a way to say "use this Dan> config if you're on 3.4 and this version if you're on 3.6", so I can stay Dan> compatible with the various versions I've got deployed. There are a few ways you can do that: 1) Using an environment variable and @include @include "/etc/syslog-ng/`SYSLOG_NG_VERSION`/main.conf" Assuming SYSLOG_NG_VERSION is either 3.4 or 3.6, you'd have your config in /etc/syslog-ng/3.4/main.conf or /etc/syslog-ng/3.6/main.conf. All you have to do, is set the appropriate environment variable. You can teach your init script to do that: export SYSLOG_NG_VERSION="$(syslog-ng -V | head -n 1 | cut -d" " -f2 | cut -d. -f1,2)" 2) Using puppet, a template and @include Instead of an environment variable, you can use a puppet template to put the appropriate version include in the config file. 3) Using puppet, an @include snippet and more @includes Instead of a template, you can also use puppet to copy either a 3.4 config, or a 3.6 config to the right place, depending on host. A variant of this is to copy both, and generate (or copy) a file that has the syslog-ng version. So, if you copy /etc/syslog-ng/conf.d/version.conf, which has: @define sng-version "3.4" And in the main config you do @include "/etc/syslog-ng/`sng-version`/main.conf", that works too. I would likely copy the appropriate config with puppet, that seems to be the cleanest. Though, the first option of using an environment variable is the most flexible, and requires the least amount of maintenance. -- |8]