Archiving Journalctl Logs in DRA
Feature Summary and Revision History
Applicable Product(s) or Functional Area |
vDRA |
Applicable Platform(s) |
Not Applicable |
Default Setting |
Enabled - Always-on |
Related Changes in This Release |
Not Applicable |
Related Documentation |
CPS vDRA Operations Guide |
Revision Details |
Release |
||
---|---|---|---|
First introduced
|
21.2.0 |
Feature Description
In vDRA, Docker engine is configured with journald logging driver on every VM. The journald logging driver sends container's logs to journal deamon.
Use the journalctl command, through journal API, or use the docker logs command to systemd journal to retrieve the log entries.
As part of the logging enhancements, vDRA supports retaining of journalctl logs for longer duration around 10 days on all VMs. This helps in debugging any issues even though journal logs gets rolled over early.
All the logs are captured through automated cron job at daily basis on nonpeak time and cronjob timings are configurable through cron job file. The collected logs are stored under /data/journal-logs directory on each VM and also stored at remote server. You can configure the size of the logs folder and days of retention in the configuration file.
On every VM, log collection happens based on disk size of the /data/journal-logs folder, Default /data/journal-logs directory size is 10GB. If the /data/journal-logs directory size is less than 10GB it will collect the logs and it will copy to the Control VM and remote server, If the /data/journal-logs directory size exceeds to 10 GB , journal.sh script deletes files beyond 2 days to free up the disk space on the VM. This parameter is also configurable from cps-journal.conf file.
You can configure the retention days and size of log storage folder on /etc/cps/cps-journal.conf file. And copying journal logs to Control VM works with static and Virtual VIP IP.
While copying the journal logs to a control VM, journal.sh script checks the / disk usage on control VM. If the disk size is less than 60 % it copies files to the control VM, otherwise it won't copy and these log files are stored on same VM based on the retention period. This disk usage value for Control VM is configuration through cps-journal.conf file.
For the CPU usage optimization, this script is limited to execute with only 50 % of the system CPU.
For more information, see Retaining journalctl Logs in DRA section in the CPS vDRA Operations Guide.