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).
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
Edit the docker-compose.yml configuration file to send the log to the system logging.
docker-compose.yml in the Exploratory Server installation folder.exploratory: section.logging: section by adding a "#" sign at the beginning of the lines and add a new configuration for the system logging like the following. exploratory:
:
:
logging:
driver: json-file
options:
max-size: "10m"
max-file: "8"
exploratory:
:
:
logging:
#driver: json-file
#options:
# max-size: "10m"
# max-file: "8"
driver: "syslog"
options:
tag: "exploratory"
scheduler section too. You can set a different value for the tag parameter to distinguish the scheduler logs from the other logs. scheduler:
:
:
logging:
driver: json-file
options:
max-size: "10m"
max-file: "8"
scheduler:
:
:
logging:
#driver: json-file
#options:
# max-size: "10m"
# max-file: "8"
driver: "syslog"
options:
tag: "exploratory-scheduler"
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.
/var/log/syslog
{
rotate 40
daily
:
:
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.
You can check out Configure Logging Drivers section of the Docker document for details.