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:
- You downloaded the
cpd-cli
v12.0.6 command line utility for your operating system and Cloud Pak for Data edition from: https://github.com/IBM/cpd-cli/releases. - You completed the steps in Creating a profile to use the cpd-cli management commands. Every
cpd-cli diag
command requires you to specify your own--profile
name.
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