Collecting diagnostic data

You can collect diagnostic data using the kubectl command line tool, or by downloading diagnostic data bundles.

Using kubectl to collect logs

You can use the following kubectl commands to collect log files:

alias kubectl='/var/lib/rancher/rke2/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml'

kubectl get pods -A -o wide --kubeconfig /etc/rancher/rke2/rke2.yaml > /tmp/pods_status_all.txt

echo "+++PODS cdp+++" >> /tmp/pods_status.txt
kubectl -n cdp get pods --kubeconfig /etc/rancher/rke2/rke2.yaml >> /tmp/pods_status.txt

echo "+++PODS kubernetes-dashboard+++" >> /tmp/pods_status.txt
kubectl -n kubernetes-dashboard get pods >> /tmp/pods.txt

echo "+++EVENTS +++" >> /tmp/pods_status_all.txt
kubectl get event -n kubernetes-dashboard >> /tmp/pods.txt

kubectl get pods -A | grep -vai 'running' | grep -vai 'completed'

If you see issues with a specific pod, collect the following:

kubectl logs <POD_NAME> -n <Namespace> --all-containers=true
kubectl describe pod <POD_NAME> -n <Namespace>
kubectl get events -n <Namespace>

Downloading ECS cluster diagnostic data

  1. In Cloudera Manager, click Support, then click Send Diagnostic Data.

  2. On the Send Diagnostic Data pop-up, select Collect Diagnostic Data only, then click Collect Diagnostic Data.
  3. The Collect Diagnostic Data Globally pop-up displays the data collection progress.
  4. When the data collection process is complete, click Download to download the ECS cluster diagnostic data.

See also: Log support in Cloudera Manager for ECS cluster

Downloading a Longhorn storage support bundle

For suspected storage issues, you can use the ECS Storage UI to download a Longhorn support bundle.

  1. In Cloudera Manager, click ECS, then select Web UI > Storage UI.
  2. Click Generate Support Bundle at the bottom of the Longhorn storage UI.
  3. On the Generate Support Bundle pop-up, enter a description (Issue URL is optional), then click OK to download the Longhorn storage support bundle.

Downloading CDP Private Cloud diagnostic data

  1. To access the Management Console, click Data Services in Cloudera Manager, then click Open CDP Private Cloud Data Services, and then select Management Console.
  2. To download a diagnostic bundle, click Administration, then click Collect and Send Diagnostic Data.
  3. On the Collect and Send Diagnostic Data pop-up, specify the duration, scope, and a size limit for the data, then click Collect and Send Diagnostic Data.
  4. When the data collection process is complete, the .zip download file appears on the Diagnostic Data page.

See also: Working with CDP Private Cloud diagnostic data