The following describes how to install syslog-ng PE in a Docker container. The following operating systems are supported:
CentOS 7
RedHat EL 7.5
Ubuntu 18.04 LTS (Bionic Beaver)
To install syslog-ng PE in a Docker container
Start Docker. Use the command appropriate for you platform:
docker run -d -p <network-ports-forwarded-to-docker> -v <directories-to-be-mounted> --name syslog-ng-in-docker centos:7
docker run -d -p <network-ports-forwarded-to-docker> -v <directories-to-be-mounted> --name syslog-ng-in-docker registry.access.redhat.com/rhel-7.5-s390x
docker run -d -p <network-ports-forwarded-to-docker> -v <directories-to-be-mounted> --name syslog-ng-in-docker ubuntu:18.04
For example, to forward port 514 and mount the etc and var directories on RedHat, use the following command: docker run -d -p 514:514 -v /root/docker/etc/:/opt/syslog-ng/etc -v /root/docker/var:/opt/syslog-ng/var --name syslog-ng-in-docker registry.access.redhat.com/rhel-7.5-s390x
Note the following points:
Forward all ports to Docker that you want to receive messages from in your syslog-ng PE configuration.
The previous example mounts the etc and var directories from outside the docker container. That way you can edit the syslog-ng PE configuration file outside the container, and the syslog-ng PE persist file will not be deleted if you delete and recreate the docker container.
Do not mount the same var directory for multiple docker containers.
Make sure that the syslog-ng PE running in the docker container has permissions to read the configuration file, and read and write permissions for the var directory.
If you want to read the logs of the host from /dev/log, mount it into the Docker container. Note that only a single syslog-ng PE instance can read /dev/log at the same time. Do not mount the same /dev/log for multiple syslog-ng PE instances.
Download the syslog-ng PE .run installation package from Downloads page.
Install syslog-ng PE in the Docker container. (Since there is no service management (systemd) in the docker container, the registration and start of the syslog-ng PE service is disabled.)
docker exec -it syslog-ng-in-docker /bin/bash
syslog-ng-premium-edition-7.0.18-linux-glibc2.11-amd64.run -- --accept-eula --silent --no-register
(Optional Step) If you want to use any features of syslog-ng PE that require external packages (for example, Java or Python-based destinations), install the required packages manually in the Docker container (for example, Java or Python).
Start syslog-ng PE.
docker exec -i syslog-ng-in-docker /opt/syslog-ng/sbin/syslog-ng <-optional-command-line-parameters-of-syslog-ng>
For the list of available command-line parameters, see the syslog-ng.8 manual page.
To start syslog-ng PE, issue the following command in the Docker container.
docker exec -i syslog-ng-in-docker /opt/syslog-ng/sbin/syslog-ng <-optional-command-line-parameters-of-syslog-ng>
To reload syslog-ng PE, issue the following command in the Docker container.
docker exec -i syslog-ng-in-docker /opt/syslog-ng/sbin/syslog-ng-ctl reload
To stop syslog-ng PE, issue the following command in the Docker container.
docker exec -i syslog-ng-in-docker /opt/syslog-ng/sbin/syslog-ng-ctl stop
To upgrade a syslog-ng PE instance that is running in a Docker container
Download the new syslog-ng PE .run installation package from Downloads page.
Upgrade syslog-ng PE in the Docker container.
docker exec -it syslog-ng-in-docker /bin/bash
syslog-ng-premium-edition-7.0.18-linux-glibc2.11-amd64.run -- --accept-eula --silent --no-register --upgrade
Start syslog-ng PE.
docker exec -i syslog-ng-in-docker /opt/syslog-ng/sbin/syslog-ng <-optional-command-line-parameters-of-syslog-ng>
For the list of available command-line parameters, see the syslog-ng.8 manual page.
This section describes the possible upgrade paths of syslog-ng PE.
Upgrading directly to syslog-ng PE version 7.0.18 is supported from syslog-ng PE version 7.0.x. To upgrade from an older 7.0.x version to version 7.0.18, see Upgrading from syslog-ng PE 7.0.x to version 7.
To upgrade a syslog-ng PE 6 LTS (6.0.x) installation to syslog-ng PE version 7.0.x, see Upgrading from syslog-ng PE 6.0.x to version 7.
The following describes how to upgrade to syslog-ng PE 7.
You must have a valid software subscription to be able to download the new version of syslog-ng PE.
To upgrade fromsyslog-ng PE 7.0.x to 7 on a production machine
Download the installer package for version 7 of syslog-ng PE from the Downloads page. Use the same package type as you used for the installation (for example, use the .run package for the upgrade if you have originally installed syslog-ng PE using a .run installer)
Login to the host you want to upgrade.
Install syslog-ng PE and check any warnings. Upgrade the respective parts of your configuration if needed.
Restart syslog-ng PE and verify that it is running and processing logs properly. For details, see Managing and checking syslog-ng service on Linux.
If you experience problems during the upgrade, contact our Support Team.
The following describes how to upgrade to syslog-ng PE 7.
|
Caution:
Read the entire document thoroughly before starting the upgrade. |
Versions 6.0.x and 7.0.x are significantly different, therefore direct upgrade is not possible. Read the entire document thoroughly before starting the upgrade. For a detailed list about the differences, see "Differences in features between syslog-ng PE 6 LTS and 7" in the Release Notes.
Hazard of data loss! When upgrading a syslog-ng PE installation that is running in server or relay mode, One Identity recommends redirecting the client logs to another syslog server to avoid message loss.
Hazard of data loss! During the upgrade, there will be periods when syslog-ng PE will not be able to receive logs. Make sure to upgrade in a dedicated maintenance window when you can disable receiving logs.
The list of supported platforms has changed in version 7.0.x. Verify that your platform is supported on the Supported platforms page. In particular, 32-bit systems are no longer supported, so they can not be upgraded to version 7.0.x.
Version 7.0.x of syslog-ng PE does not support every feature of 6.0.x. For a detailed list about the differences, see "Differences in features between syslog-ng PE 6 LTS and 7" in the Release Notes.
Features available in both 7.0.x and 6 LTS may work differently. For a detailed list about the differences, see "Differences in features between syslog-ng PE 6 LTS and 7" in the Release Notes.
You must have a valid software subscription to be able to download the new version of syslog-ng PE.
Complete the following steps before starting the actual upgrade process.
Download the installer package for the latest 7.0.x version of syslog-ng PE from the Downloads page.
If you are using syslog-ng PE in server mode, download the new license from My License Assets.
Install syslog-ng PE 7 on a test machine.
Replace the syslog-ng PE configuration file on the test machine with your syslog-ng PE version 6.0.x configuration file.
Edit the configuration file: update the version string to @version: 7.0.
Update the configuration file.
Some features and functionalities have changed between version 6 and 7 and require you to change the configuration file, for example, to delete options that have been removed from the product, or change the names of options that have been renamed. For a detailed list about the differences, see "Differences in features between syslog-ng PE 6 LTS and 7" in the Release Notes.
Perform the following steps until you have an updated configuration file that properly works with syslog-ng PE 7.
Check the configuration for syntax errors using the syslog-ng --syntax-only --cfgfile <your-modified-configuration-file> command. Modify your configuration to correct any errors and warnings.
Restart syslog-ng.
Verify that message filtering and processing (for example, parsing and rewriting) works properly.
Verify that the format and content of the output messages is correct, including the SDATA of RFC-5424-formatted messages if you are using them.
To upgrade from syslog-ng PE 6.0.x to 7 on a production machine
Before upgrading the host to syslog-ng PE 7, upgrade it to the latest available 6.0.x version.
Login to the host you want to upgrade.
|
Caution:
Hazard of data loss! This host will not be able to receive or send log messages until the upgrade procedure is complete. Make sure to upgrade in a dedicated maintenance window when you can disable receiving logs. When upgrading a syslog-ng PE installation that is running in server or relay mode, One Identity recommends redirecting the client logs to another syslog server to avoid message loss. |
Stop syslog-ng PE version 6.
Verify that syslog-ng PE has stopped. The output of the following command must be empty: ps axu | grep syslog-ng
Create a backup of the syslog-ng PE installation directory using the following command: cp -a /opt/syslog-ng /opt/syslog-ng-pe6-backup
Uninstall syslog-ng PE version 6. For details, see Uninstalling syslog-ng PE 6.
Delete the installation directory using the following command: rm -rf /opt/syslog-ng
Download the new installer package from the Downloads page.
Install syslog-ng PE 7. For details, see "Installing syslog-ng" in the Administration Guide.
If you want to run syslog-ng PE under a non-privileged user, see this knowledgebase article for details.
Stop syslog-ng PE version 7 started by the installer.
Copy the syslog-ng PE version 7 configuration file that you created on your test machine into the /opt/syslog-ng/etc directory of the host you are upgrading.
If the host you are upgrading is running syslog-ng PE in server mode, replace the old (version 6) license file with the new one.
|
Caution:
Hazard of data loss! Without the new license file, syslog-ng PE will run in relay mode, and will not store the incoming messages locally. |
Restart syslog-ng PE and verify that it is running and processing logs properly. For details, see Managing and checking syslog-ng service on Linux.
If you experience problems during the upgrade, contact our Support Team.
© 2021 One Identity LLC. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy