[syslog-ng] external configuration file
Kalin KOZHUHAROV
kalin.kozhuharov at jp.adecco.com
Wed Jan 24 02:19:19 CET 2007
Hi, all
Michael Fernández M. wrote:
>
> i have a big syslog-ng.conf file, because of the many filters and
> destinations that i´m already using. So my question is: can i use a file
> that`s contains all the filter for a specific device, another file for
> the destinations?
>
>
> something like:
>
> file_with_filter_a "(/etc/syslog-ng/filters/host_a)"
>
> file_with_filter_b "(/etc/syslog-ng/filters/host_b)"
>
> file_with_destinations "(/etc/syslog-ng/destinations/host_b)"
>
> then in the syslog-ng.conf only have to "call" those files?, and not put
> all the filters and destinations inside the same syslog-ng.conf?
>
Well, I spend quite some time to look for such syntax, there seems to be none.
I'd like to have it as well, but to make things simple, I'd suggest only top
level include (think C preprocessor #include). If possible with multiple levels
of inclusions like the apache directive Include[1]. So I'd be able to split the
log file per host-group/customer:
/etc/syslog/conf/syslog-ng.conf
/etc/syslog/conf/clients/client-a/hostA.conf
/etc/syslog/conf/clients/client-a/hostB.conf
/etc/syslog/conf/clients/client-B/host23.conf
....
[1] http://httpd.apache.org/docs/2.2/mod/core.html#include
Until this is provided, I'd suggest using vim's foldmethod=marker[2], as it
really does 60% of the job and is even easier to manage sometimes.
[2] http://applications.linux.com/article.pl?sid=06/05/18/1915233&tid=13
BTW, anybody willing to write a good syntax file for syslog-ng.conf?
Kalin.
--
| A |
| D |
| J |
| P |
More information about the syslog-ng
mailing list