Configuring Docker services on BDDS 9.3.3, 9.4.1 or 9.5.0 to allow for log forwarding - Adaptive Applications - BlueCat Gateway - 23.2.4

BlueCat Distributed DDNS Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
23.2.4

On BlueCat DNS/DHCP Servers (BDDS) versions 9.3.3, 9.4.1 and 9.5.0, the Docker service is configured to use the default json-file logging driver (instead of journald). When setting up a centralized logging server (as described in Forwarding logs to other services), this means that the BDDS cannot forward log messages to the locally-configured syslog server.

To configure the Docker servise to allow this, do the following.

  1. Add a configuration file to the BDDS that sets the log driver to journald:

    1. Create a the new directory for the configuration file. To do so, run the following command:
      mkdir /etc/systemd/system/docker.service.d
    2. Within the new docker.service.d directory, create a new text file named d-ddns.conf and add the following content to it. (You can use any text editor, such as nano.)

      [Service]
      ExecStart=
      ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --log-driver=journald
      Tip: To download a copy of this configuration file in a Zip archive, click here.

    When you're done, run the command systemctl status docker to check whether the file was created in the correct place. You should receive a warning that the unit file, configuration file, or drop-ins of docker.service have changed.

  2. Tell Docker to reload the unit file. To do so, run the following command:

    systemctl daemon-reload

    To verify that the command worked successfully, run the command systemctl status docker again. The entry for Drop-In should be set to the configuration file that you just created.

  3. Restart the Docker daemon. To do so, run the following command:

    systemctl restart docker

    To verify that the command worked successfully, run the command systemctl status docker again. Both the entry for Drop-In and the executed dockerd command should have the --log-driver=journald option.

  4. Verify that the Docker daemon now uses the option --log-driver=journald. To do so, run the following command:

    docker info --format '{{.LoggingDriver}}
  5. Redeploy the Docker containers on the BDDS so that the containers use the same logging driver. Make sure that you use the same version you used when first deploying each container.

  6. After deploying, verify that the containers are using the journald driver instead of json-file. To do so, run the following command:

    docker inspect -f '{{.HostConfig.LogConfig.Type}}' <container_name>