How to make the Exploratory Server log persistent.

It describes how to make the Exploratory Server log persistent. By default, if you restart the Exploratory Server, it will clean up old log files by the Docker system.

You can customize the logging destination by updating the docker-compose.yml configuration file to make logs persistent. This note describes how to do it using the Unix logging system (syslog).

1. Check the system logging availability.

On most of the popular Linux systems, the rsyslog is used for system logging. Open a terminal window connected to the server where the Exploratory Server is running and run the following command.

ps -ef|grep rsyslog

The output will look like the following. If you see a line like /usr/sbin/rsyslogd, the system logging is available on your system.

$ ps -ef|grep rsyslog
syslog     60924       1  0 May25 ?        00:01:13 /usr/sbin/rsyslogd -n -iNONE
ubuntu   1646090 1646021  0 22:39 pts/0    00:00:00 grep --color=auto rsyslog

2. Update docker-compose.yml

Edit the docker-compose.yml configuration file to send the log to the system logging.

  1. Open the docker-compose.yml in the Exploratory Server installation folder.
  2. Find the exploratory: section.
  3. Comment out the existing lines under the logging: section by adding a "#" sign at the beginning of the lines and add a new configuration for the system logging like the following.

Before:

 exploratory:
     :
         :
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "8"
                

After:

 exploratory:
     :
         :
    logging:
      #driver: json-file
      #options:
      #  max-size: "10m"
      #  max-file: "8"
      driver: "syslog"
      options: 
        tag: "exploratory"
  1. (Optional) If you want to make the scheduling logs persistent too, you can add the same configuration under the scheduler section too. You can set a different value for the tag parameter to distinguish the scheduler logs from the other logs.

Before:

 scheduler:
     :
         :
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "8"
                

After:

 scheduler:
     :
         :
    logging:
      #driver: json-file
      #options:
      #  max-size: "10m"
      #  max-file: "8"
      driver: "syslog"
      options: 
        tag: "exploratory-scheduler"

4. (Optional) Update the system logging setting.

Usually, the system logging keeps logs only for a couple of days. You can update the logging system configuration to keep logs longer.

For example, for the rsyslog case, you can update the rotate option in the /etc/logrotate.d/rsyslog file to update how many days to keep logs. Please take a look at the manual of your system for more details.

Example of /etc/logrotate.d/rsyslog

/var/log/syslog
{
        rotate 40
        daily
            :
            :

5. Restart the Exploratory Server.

Once the change is done, restart the server to make the change effective.

$ docker-compose down
$ docker-compose up -d

After restarting the server, access the Exploratory Server from a browser, and make sure the access log shows up in the Unix system log file. Usually, the file is located at /var/log/syslog.

If you have any problem, please contact support.

Reference

You can check out Configure Logging Drivers section of the Docker document for details.

Export Chart Image
Output Format
PNG SVG
Background
Set background transparent
Size
Width (Pixel)
Height (Pixel)
Pixel Ratio