diag
gather-diagnostics
Gather diagnostic information about the services associated with an instance of Cloud Pak for Data and create a diagnostics log.
Extended description
When you run the gather-diagnostics command, you must specify the services that
you want to gather information about. Run the diag
list-services command to get a list of the services that you
can gather diagnostic data for. Diagnostic information for the dependencies of these services is
automatically included in the
log.
gather-diagnostics command collects more logs and resources in the
diagnostics log file.- Pod container logs for the operator namespace are saved in the Cloud Pak for Data folder.
- Health check information is saved as YAML files in the Healthcheck folder.
These resources include:
- Cluster resources, which include nodes, node metrics, cluster operators, machine config pools, and certificate signing requests.
- Operator resources, which include cluster service versions, catalog sources, subscriptions, install plans, operator groups, operand requests, pods, and deployments.
- Operand resources, which include Cloud Pak for Data service custom resources, operand configs, operand registries, and operand bind information.
For more information, see Installing privileged monitors.
Prerequisites
Before you can complete certain IBM® Software Hub setup and management tasks, you must create a
profile so that you can run the appropriate cpd-cli commands. A profile
enables the cpd-cli to verify that you are a IBM Software Hub user and that you have the appropriate
administrator permissions to complete a task. For more information, see Creating a profile to use the cpd-cli management commands.
Syntax
cpd-cli diag gather-diagnostics <product-id> \
[--from=<year-month-dayTh:m:s-05:00>] \
[--output=json|yaml|text] \
--profile=<cpd-profile-name> \
[--to=<year-month-dayTh:m:s-05:00>] \
[--verbose]
Arguments
| Argument | Description |
|---|---|
<product-id> |
One or more product IDs (in a comma-separated list) to gather diagnostics for. |
Options
| Option | Description |
|---|---|
|
|
The RFC3339 format timestamp from
which to begin gathering diagnostics.
|
|
|
Display command
help.
|
|
|
Specify an output
format.
|
--profile |
The name of the profile that you
created to store information about an instance of Cloud Pak for Data and your credentials for the
instance.
|
|
|
The RFC3339 format timestamp from
which to stop gathering diagnostics.
|
--verbose |
Logs include more detailed
messages.
|
Examples
It is strongly recommended that you use a script to create environment variables with the correct values for your environment. For more information, see Setting up installation environment variables.
- Retrieve the diagnostics logs from a Cloud Pak for Data service.
-
cpd-cli diag gather-diagnostics <product-id> \ --profile=${CPD_PROFILE_NAME}