Gathering diagnostics from Cloud Pak for Data services
Use the cpd-cli
health command-line interface to assess the health of your Red Hat®
OpenShift® cluster and the Cloud Pak for Data platform. Use the cpd-cli
diag command-line interface to gather diagnostics on your Cloud Pak for Data services.
Before you begin
Before you run any cpd-cli
health or cpd-cli
diag commands, complete the following prerequisites.
Checking the health of your cluster
You can use any of the cpd-cli
health commands to perform regular health checks or to provide
more information when you open a case with IBM Support.
-
Perform a health check on cluster resources, such as machine config pools, cluster operators, and the Kubernetes etcd cluster. There is also a connectivity test to see whether allowlisted URLs for air-gapped installation are accessible (for example, https://icr.io, https://github.com/IBM, and https://mirror.openshift.com/pub). You must log in to the Red Hat OpenShift Container Platform as a cluster administrator to use this command.
cpd-cli health cluster -
Perform a health check on node resources and usage. You must log in to the Red Hat OpenShift Container Platform as a cluster administrator to use this command.
cpd-cli health nodes -
Perform a health check on operand namespace resources. This command includes checks on the control plane namespace and any tethered namespaces. Resources include StatefulSets, deployments, pods, persistent volume claims, add-on services, and Cloud Pak for Data service custom resources. There is also a Cloud Pak for Data Platform check to see whether URLs for various Cloud Pak for Data control plane components are accessible. You must log in to the Red Hat OpenShift Container Platform as a cluster administrator to use this command.
cpd-cli health operands --control_plane_ns=${PROJECT_CPD_INST_OPERANDS} --verbose -
Perform a health check on operator namespace resources. This command includes checks on cluster service versions, catalog sources, subscriptions, deployments and pods. You must log in to the Red Hat OpenShift Container Platform as a cluster administrator to use this command.
cpd-cli health operators --control_plane_ns=${PROJECT_CPD_INST_OPERANDS} --operator_ns=${PROJECT_CPD_INST_OPERATORS} -
Perform a health check on storage performance.
cpd-cli health storage-performance --param param.yml -
Perform a health check on storage validation.
cpd-cli health storage-validation --param param.yml
For more information, see health.
Gathering diagnostics
You can use the cpd-cli
diag commands to check health and gather diagnostics for Cloud Pak for Data services.
Every cpd-cli
diag command requires you to specify your own --profile name. The following commands use the default profile named
default.
-
To list the services on a Cloud Pak for Data instance, run the following command.
cpd-cli diag list-services --profile=${CPD_PROFILE_NAME} -o typeFor the output type, you can specify
json,yaml, ortext. The default output type istext. -
To retrieve the diagnostics logs from a service, run the following command.
cpd-cli diag gather-diagnostics product-id --profile=${CPD_PROFILE_NAME} -
To list the diagnostics jobs, run the following command.
cpd-cli diag list-jobs --profile=${CPD_PROFILE_NAME} -
To download the diagnostics logs for a job, run the following command.
cpd-cli diag download-logs job-id --profile=${CPD_PROFILE_NAME} -
To delete the diagnostics job, run the following command.
cpd-cli diag delete-job job-id --profile=${CPD_PROFILE_NAME}
For more information, see diag.