2025-03-14 21:59:59 -06:00
|
|
|
# gcpdiag
|
|
|
|
|
|
|
|
|
|
> Google Cloud Platform troubleshooting and diagnostics tool.
|
|
|
|
|
> Run in a Docker container or in GCP Cloudshell.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://github.com/GoogleCloudPlatform/gcpdiag#usage>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run `gcpdiag` on your project, returning all rules:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`gcpdiag lint --project {{gcp_project_id}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Hide rules that are ok:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`gcpdiag lint --project {{gcp_project_id}} --hide-ok`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Authenticate using a service account private key file:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`gcpdiag lint --project {{gcp_project_id}} --auth-key {{path/to/private_key}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Search logs and metrics from a number of days back (default: 3 days):
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`gcpdiag lint --project {{gcp_project_id}} --within-days {{number}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
|
|
|
|
`gcpdiag lint --help`
|