Log settings

REDIRECT: This URL has changed to https://support8.gwos.com/gw/gw8/latest/welcome-to-groundwork-monitor/installation/new-install/log-settings
Click the link above if you are not automatically redirected in 10 seconds.

GroundWork recommends keeping some container logs on disk for support and troubleshooting purposes. The default settings for Docker retain too much data to be useful, so we recommend making the following changes on production systems.

Add or edit the docker daemon logging control file

  1. Log in as root to your GroundWork server and edit the file /etc/docker/daemon.json.

    Docker version

    This file may or may not exist, depending on your Docker version and package. 

  2. Add (or edit) the log driver section to look like this:

      "log-driver": "json-file",
      "log-opts": {
        "max-size": "10m",
        "max-file": "3",
        "labels": "production_status",
        "env": "os,customer"

    If the file does not exist, just create it with this content. These settings will keep a maximum of 30M of log data for each container. For reference see: https://docs.docker.com/config/containers/logging/configure/

  3. For this setting to take effect, you must stop and restart the docker daemon, or reboot your host.  If you are already running GroundWork and are adding this setting, your logs will not be truncated until the containers are re-created, which will occur at your next upgrade or re-install.