Gathering diagnostics from Cloud Pak for Data services

Use the cpd-cli diag command-line interface to check health and gather diagnostics on your Cloud Pak for Data services.

Before you run any cpd-cli diag commands, ensure that:

The following commands use the default profile named default.

Gather diagnostics

To list the services on a Cloud Pak for Data instance, run the following command.

cpd-cli diag list-services --profile default -o type

For the output type, you can specify json, yaml, or text. The default output type is text.

To retrieve the diagnostics logs from a service, run the following command.

cpd-cli diag gather-diagnostics product-id --profile default

To list the diagnostics jobs, run the following command.

cpd-cli diag list-jobs --profile default

To download the diagnostics logs for a job, run the following command.

cpd-cli diag download-logs job-id --profile default

To delete the diagnostics job, run the following command.

cpd-cli diag delete-job job-id --profile default

Check health

The health check commands require you to log into Red Hat® OpenShift® as the cluster administrator:

oc login -u <username> -p <password>

To retrieve a health check report for all Cloud Pak for Data services, run the following command.

cpd-cli diag healthcheck

To retrieve a health check report for all pods and containers, run the following command.

cpd-cli diag healthcheck pods-and-containers