Logging#
Overview#
An Enterprise Nucleus Server provides detailed logs that can be used to help troubleshoot issues that may occur. Detailed instructions for locating and reviewing these logs are below.
Nucleus Logs for API, LFT, Tagging Service, and Thumbnail Services#
The logs for these services is written to the /log
directory within the DATA_ROOT
directory of your Enterprise Nucleus Server.
Note
The default DATA_ROOT
location is /var/lib/omni/nucleus-data
.
Within this folder, you will find the following directories: api
, lft
, tagging
, and thumbnails
. Within each of those directories, you will find a corresponding log file.
By default, these log files are written in a text-based unstructured format. To change this to a structured JSON format, follow the steps below:
Log into your Enterprise Nucleus Server.
Navigate to the location where the Nucleus Base Stack was deployed. If your Enterprise Nucleus Server was installed using the suggested location, use the following command:
cd /opt/ove/base_stack
Stop the running Nucleus containers using the following command:
sudo docker compose --env-file /opt/ove/base_stack/nucleus-stack.env -f /opt/ove/base_stack/nucleus-stack-no-ssl.yml down
Note
If the Nucleus Base Stack was installed into a different directory, change the command above as needed.
Once all the containers are stopped, using your preferred text editor (nano is used for this example), open the
nucleus-stack.env
file:
sudo nano nucleus-stack.env
Scroll to the bottom of the file, locate the
Feature Flags
section, and enable structured logging:
ENABLE_STRUCTURED_LOGGING=1
Once the configuration change is complete, save the file using
CTRL+O
, then exit the nano editor usingCTRL+X
.Start the Nucleus containers using the following command:
sudo docker compose --env-file /opt/ove/base_stack/nucleus-stack.env -f /opt/ove/base_stack/nucleus-stack-no-ssl.yml up -d
Upon the start of the containers, Nucleus logs will be written to the file system in JSON format.
Viewing Nucleus Container Logs#
At times, it may be required to view the STDOUT (standard out) logs from a Nucleus container. If needed, follow these steps:
Display the list of the running containers using the following command:
sudo docker ps
Locate the container for the logs you want to view and make note of the container ID. (This will be a 12 character alpha-numeric ID.)
To display the logs to the screen, use the following command:
sudo docker logs $container_id
To export the logs to a file, use the following command:
sudo docker logs $container_id >& exported_log_filename.log
Note
For the commands above, replace the $container_id
with the actual container ID that was obtained using the docker ps
command.