Introduction
This document describes the general procedure for Redundancy Configuration Manager (RCM) log collection.
Procedure for RCM Log Collection
These are the components of RCM:
- Controller
- Checkpointmgr
- BFDMGR
- OPScenter
- Configmgr
Based on the issue scenario, it is essential to pinpoint the troublesome elements that can serve as the basis for capturing logs.
The procedure is the same for all the components as described here.
-
If you need to review recent logs, such as those from the last 1 to 2 hours, you can simply gather the pod logs for that specific component.
kubectl get svc -o wide -A -n rcm
With this command, you get all the pods with their IPs and name.
kubectl logs <pod name> -n rcm
Just mention the pod name for which logs are required.
- If you need to examine logs that are older than 2 hours, the RCM system stores all generated logs for a maximum of 4 days. You can retrieve them using the procedure outlined here.
1. Navigate to the directory path: /var/log/containers
, and use the grep
command to search for the specific component logs that you need.
In this scenario, let's take the controller as an example. If you require logs for configmgr/checkpointmgr, you need to use the 'grep' command, while the rest of the procedure remains unchanged.
root@h10-126-83-128:/var/log/containers# ls -la | grep controller
lrwxrwxrwx 1 root root 107 Mar 29 07:07 rcm-controller-6547b466ff-zsrcd_rcm_rcm-controller-4c149c1e962992a241dd5201aadb07237f52947740724c1df2a01b1b6bfbc671.log -> /var/log/pods/rcm_rcm-controller-6547b466ff-zsrcd_ff74e5fc-9a07-4073-8956-90cd978ac98e/rcm-controller/0.log
2. Find out the controller directory.
From Step 1., you can see the controller directory as mentioned here:
/var/log/pods/rcm_rcm-controller-6547b466ff-zsrcd_ff74e5fc-9a07-4073-8956-90cd978ac98e/rcm-controller/0.log
Get into this path
root@h10-126-83-128:/var/log/containers# ls -la /var/log/pods/rcm_rcm-controller-6547b466ff-zsrcd_ff74e5fc-9a07-4073-8956-90cd978ac98e/rcm-controller/
total 12
drwxr-xr-x 2 root root 4096 Mar 29 07:07 .
drwxr-xr-x 3 root root 4096 Mar 29 07:07 ..
lrwxrwxrwx 1 root root 165 Mar 29 07:07 0.log -> /var/lib/docker/containers/4c149c1e962992a241dd5201aadb07237f52947740724c1df2a01b1b6bfbc671/4c149c1e962992a241dd5201aadb07237f52947740724c1df2a01b1b6bfbc671-json.log
3. Get all the .log
files (tar/zipped) files.
In Step 2, once you have obtained the path where log files are stored, navigate to that path and collect the .log/.gz files as needed.
root@h10-126-83-128:/var/log/containers# ls -la /var/lib/docker/containers/4c149c1e962992a241dd5201aadb07237f52947740724c1df2a01b1b6bfbc671/
total 6448
drwx------ 4 root root 4096 Mar 29 07:07 .
drwx------ 69 root root 12288 Mar 29 07:07 ..
-rw-r----- 1 root root 6548746 Mar 29 10:08 4c149c1e962992a241dd5201aadb07237f52947740724c1df2a01b1b6bfbc671-json.log
drwx------ 2 root root 4096 Mar 29 07:07 checkpoints
-rw------- 1 root root 23306 Mar 29 07:07 config.v2.json
-rw-r--r-- 1 root root 2469 Mar 29 07:07 hostconfig.json
drwx------ 2 root root 4096 Mar 29 07:07 mounts
root@h10-126-83-128:/var/log/containers#