Syntax error due to include files in syslog-ng.conf
Hi all, I've built syslog-ng V 3.0.1 from the released source and have the following at the top of syslog-ng.conf ----- @version:3.0 include "/etc/syslog-ng/options.inc"; include "/etc/syslog-ng/src-dest-defs.inc"; include "/etc/syslog-ng/filter-defs.inc"; include "/etc/syslog-ng/common-log-defs.inc"; ------ syntax checking as # syslog-ng -s returns with syntax error at line 3. Here are the relevant portion from the syslog-ng-admin-guide.pdf ----- Every syslog-ng configuration file must begin with a line containing the version infor mation of syslog-ng. For syslog- ng version 3.0, this line looks like: @version:3.0 . . . The syslog-ng application supports including external files in its configuration file, so parts of its configuration can be managed separately. To include the contents of a file in the syslog- ng configuration, use the following syntax include "filename"; This imports the entire file into the configuration of syslog-ng, at the location of the include statement. If you specify a directory, syslog-ng will try to include every file in alphabetic order. When including configuration files, consider the following points: ---- The config file works okay if I copy-paste the corresponding files in place of the include statements so the included files themselves are syntactically correct. So I don't see where I'm making an error. I hope there isn't a bug in the source. I'm not counting out that possibility since there was a bug in the released source for which I had to obtain a patch from the git repo: https://lists.balabit.hu/pipermail/syslog-ng/2009-January/012400.html Help much appreciated ! Ritesh
On Wed, 2009-03-18 at 20:01 -0700, Ritesh Sood wrote:
Hi all,
I've built syslog-ng V 3.0.1 from the released source and have the following at the top of syslog-ng.conf ----- @version:3.0
include "/etc/syslog-ng/options.inc"; include "/etc/syslog-ng/src-dest-defs.inc"; include "/etc/syslog-ng/filter-defs.inc"; include "/etc/syslog-ng/common-log-defs.inc"; ------
The reason is that include support was added _after_ 3.0.1. So you either need a nightly snapshot, or just as I mentioned in the other email on this list, you could give a spin to the new binary packages that we released. Since I feel that the syslog-ng OSE codebase itself is quite good shape, the only questionable part is the binary installers. If those would be at least marginally usable to some in the field users, I'd do the release to avoid having to keep the fixes/additions of 3.0.2 any longer. Until then, you have to compile a daily snapshot to have the include feature. -- Bazsi
Hi Baszi, thanks for your mail. Although i would very much like to contribute to the community by testing out the binary installer, I'm not in a position to do that. Our server-client machines is a pretty heterogenous mix of linux distributions and on top of that, different releases among distributions. Second, due to the way the network has evolved over the years, the installed files are distributed in somewhat non-standard way. So I have no option but to compile from source. Thanks again for the info. Ritesh On Mar 23, 2009, at 1:43 PM, Balazs Scheidler wrote:
On Wed, 2009-03-18 at 20:01 -0700, Ritesh Sood wrote:
Hi all,
I've built syslog-ng V 3.0.1 from the released source and have the following at the top of syslog-ng.conf ----- @version:3.0
include "/etc/syslog-ng/options.inc"; include "/etc/syslog-ng/src-dest-defs.inc"; include "/etc/syslog-ng/filter-defs.inc"; include "/etc/syslog-ng/common-log-defs.inc"; ------
The reason is that include support was added _after_ 3.0.1. So you either need a nightly snapshot, or just as I mentioned in the other email on this list, you could give a spin to the new binary packages that we released. Since I feel that the syslog-ng OSE codebase itself is quite good shape, the only questionable part is the binary installers.
If those would be at least marginally usable to some in the field users, I'd do the release to avoid having to keep the fixes/additions of 3.0.2 any longer.
Until then, you have to compile a daily snapshot to have the include feature.
-- Bazsi
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
participants (2)
-
Balazs Scheidler
-
Ritesh Sood