Container Essentials: How to Collect Diagnostic Logs
search cancel

Container Essentials: How to Collect Diagnostic Logs

book

Article ID: 286992

calendar_today

Updated On:

Products

Carbon Black Cloud Container

Issue/Introduction

How to collect diagnostics for CB Container Essential resources.

Environment

  • VMWare Carbon Black Container Essentials: All Versions

Resolution

  1. SSH into Kubernetes cluster [NOTE: SSH is not strictly required as long as you have access via kubectl]
  2. Run the following command:
    kubectl logs -n cbcontainers-dataplane -l control-plane=operator --tail=-1 > operator-logs_$(date +%b_%d_%Y_%H_%M_%S.txt)
  3. Run the following which generates logs for each component in the dataplane.
    kubectl logs -l 'app.kubernetes.io/name in (cbcontainers-hardening-enforcer, cbcontainers-hardening-state-reporter, cbcontainers-image-scanning-reporter, cbcontainers-monitor, cbcontainers-node-agent, cbcontainers-runtime-resolver)' --all-containers --prefix -n cbcontainers-dataplane
  4. Transfer the operator-logs*.txt file and attach to the support case. If the file is large, use CBVault.

Additional Information

  • If the namespace has been renamed, the -n switch can be modified to specify the new namespace
  • If the label has been renamed, the -l switch can be modified to specify the new label