I run syslog-ng on several platforms with the default /etc/syslog-ng/syslog-ng.conf
, as well as an independent /etc/syslog-ng/conf.d/myconfig.conf
In that specifc configuration I would like to reuse s_src
from syslog-ng.conf
, defined there as
source s_src {
system();
internal();
};
Unfortunately there are two problems which complicate my configuration:
s_src
is the default name on Debian, it iss_sys
on CentOS (for the same source)- it is not possible to have twice
internal()
as a source in a config (syslog-ng
log showsMultiple internal() sources were detected, this is not possible;
)
I am currently stuck with managing two identical sets of config files due to that single difference. Therefore:
- is it possible to conditionally use one source or another, depending on the platform (unfortunately, the platform is not part of the
ENV
variables)? - or is a "soft-fail" possible - that is making so that syslog-ng does not stop parsing the configuration file upon an error? (in that case I would simply have two
log
entries with both sources, of which one would always fail for a given platform)