# diagrid diagnose

Collect Catalyst diagnostics from your Kubernetes cluster

### Description

Capture comprehensive diagnostic information for Catalyst environments.

This command collects:

- All configurations, logs (including previous runs if crashing), and metrics from pods
- Resources from configurable namespaces (cra-agent, root-dapr-system, and prj-\* namespaces)
- On a cluster running the self-hosted control plane, the same from its controlplane
  namespace, plus the status and chart version of its Helm releases (never their values)
- Events from all monitored namespaces
- The Helm values the data plane was installed with (helm get values)
- A summary report with project count, sidecar count, and any detected issues
- Optional agent endpoint data (if accessible)
- A check of the control plane endpoints the data plane dials (see 'diagrid diagnose endpoints')

Tokens, passwords and private keys found in logs, events, ConfigMaps and Helm values
are masked before they are written to the archive.

The diagnostic report is packaged into a tar.gz file that can be sent to support engineers
for analysis. The report includes a SUMMARY.txt file that highlights critical issues
in an easy-to-find format.

```
diagrid diagnose [flags]
```

### Examples

```
  # Capture diagnostics with default settings
  diagrid diagnose

  # Capture diagnostics with custom namespace names
  diagrid diagnose --agent-namespace my-agent-ns --root-dapr-namespace my-dapr-ns

  # Capture diagnostics for different project prefix
  diagrid diagnose --project-ns-prefix myproj-

  # Capture diagnostics including agent projects endpoint
  diagrid diagnose --fetch-agent-projects

  # Specify custom output file
  diagrid diagnose --output-file my-diagnostics.tar.gz
```

### Options

```
      --agent-namespace string       Namespace where the CRA agent is deployed (default "cra-agent")
      --fetch-agent-projects         Attempt to fetch project data from the agent's :8787/projects endpoint (may require port-forward)
  -h, --help                         help for diagnose
      --output-file string           Output file path for the diagnostic archive (default "catalyst-dump.tar.gz")
      --project-ns-prefix string     Prefix for project namespaces to collect diagnostics from (default "prj-")
      --root-dapr-namespace string   Namespace where root Dapr system components are deployed (default "root-dapr-system")
      --skip-network                 Skip checking the control plane endpoints (DNS, TLS, ALPN, certificates) from this machine
```

### SEE ALSO

- [diagrid diagnose endpoints](./endpoints.md)	 - Check DNS, TLS mode, ALPN and certificates of the control plane hostnames
