Logs
Access and manage Redis Enterprise logs on Kubernetes for monitoring and troubleshooting.
| Redis Enterprise for Kubernetes |
|---|
Access and manage Redis Enterprise logs on Kubernetes for monitoring, troubleshooting, and debugging your Redis Enterprise deployment. Logs provide valuable insights into cluster operations, database performance, and system health.
Log collection and access
Learn how to collect and access logs from your Redis Enterprise deployment:
- Collect logs - Methods for collecting logs from Redis Enterprise pods and containers
Log storage and access
Each Redis Enterprise container stores its logs under /var/opt/redislabs/log. When using persistent storage, this path is automatically mounted to the redis-enterprise-storage volume, making logs accessible through sidecar containers or external log collection tools.
For example, in the REC (Redis Enterprise Cluster) spec you can add a sidecar container, such as a busybox, and mount the logs to there:
sideContainersSpec:
- name: busybox
image: busybox
args:
- /bin/sh
- -c
- while true; do echo "hello"; sleep 1; done
volumeMounts:
- name: redis-enterprise-storage
mountPath: /home/logs
subPath: logs
Now the logs can be accessed from in the sidecar. For example by running
kubectl exec -it <pod-name> -c busybox -- tail home/logs/supervisord.log
The sidecar container is user determined and can be used to format, process and share logs in a specified format and protocol.
Check cluster health
Check pod readiness and the cluster status before you collect logs. These checks often show the cause of a problem directly.
Check pod readiness
Run kubectl get pods in your REC namespace. Each pod should show all of its containers ready in the READY column.
Check the cluster status
Run kubectl get rec. A healthy cluster shows these values:
STATEisRunning, orRunningRollingUpdatewhile a rolling update is in progress.SPEC STATUSisValid.Invalidmeans the REC specification isn't valid.LICENSE STATEisValid. If it'sExpiredorLICENSE EXPIRATION DATEis close, update your license.
The license columns are empty unless STATE is Running, RunningRollingUpdate, Initializing, or Upgrade.