syslog-ng doesn't properly evaluate nested filters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
syslog-ng (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Having a problem with syslog-ng 3.5.6-2.1 on Ubuntu 16.04 LTS.
It doesn't properly evaluate syslog message with nested filter configuration below.
# /etc/syslog-
destination d_filtered { file("/
filter f_1 { host("ubuntu"); };
filter f_2 { filter(f_1); };
filter f_3 { filter(f_2); };
log { source(s_src); filter(f_3); destination(
$ sudo systemctl restart syslog-ng
$ logger foo
# it does NOT report the log into /var/log/
3 nested filters works wrong, but 2 nested filters does.
# /etc/syslog-
destination d_filtered { file("/
filter f_1 { host("ubuntu"); };
filter f_2 { filter(f_1); };
log { source(s_src); filter(f_2); destination(
$ sudo systemctl restart syslog-ng
$ logger foo
# it reports "Jul 15 03:26:51 ubuntu-xenial ubuntu: foo" into /var/log/
This problem was fixed on a newer version of syslog-ng,
# install dependencies
$ sudo apt-get install -y build-essential pkg-config libtool automake libglib2.0-dev
$ git clone https:/
$ cd eventlog/
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig
# install a newer syslog-ng
$ wget https:/
$ tar zxvf syslog-
$ cd syslog-ng-3.6.2/
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig
# append similar configuration into scl/syslog-ng.conf
destination d_filtered { file("/
filter f_1 { host("ubuntu"); };
filter f_2 { filter(f_1); };
filter f_3 { filter(f_2); };
log { source(s_local); filter(f_3); destination(
$ sudo syslog-ng -F -f ./scl/syslog-
$ logger foo
# it reports "Jul 15 03:47:52 ubuntu-xenial ubuntu[8034]: foo" into /var/log/
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: syslog-ng 3.5.6-2.1
ProcVersionSign
Uname: Linux 4.4.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Fri Jul 15 04:15:33 2016
PackageArchitec
ProcEnviron:
TERM=screen-
SHELL=/bin/bash
PATH=(custom, user)
LANG=en_US.UTF-8
XDG_RUNTIME_
SourcePackage: syslog-ng
UpgradeStatus: No upgrade log present (probably fresh install)
I'd recommend using a newer version of syslog-ng. You can find binaries at https:/ /syslog- ng.org/ 3rd-party- binaries/