ยง2024-05-31

Compiling syslog-ng with MongoDB Support If the module is missing or if syslog-ng was not compiled with MongoDB support, you might need to install or compile it manually. Here are the steps:

  1. Install Dependencies

sudo apt-get install -y build-essential cmake libmongo-client-dev apt-get install -y build-essential cmake libmongo-client-dev bison

  1. Download and Compile syslog-ng
alexlai@n2Bookworm:~$ mkdir -p build/src && cd $_

$ wget https://github.com/syslog-ng/syslog-ng/archive/refs/tags/syslog-ng-3.38.1.tar.gz
$ cd ..
$ tar xvf src/syslog-ng-3.38.1.tar.gz
alexlai@n2Bookworm:~/build$ cd syslog-ng-syslog-ng-3.38.1/
$ cmake -DENABLE_MONGO=ON 

tar xzf syslog-ng-3.38.1.tar.gz
cd syslog-ng-3.38.1

mkdir build
cd build
cmake -DENABLE_MONGO=ON ..
make
sudo make install