LinuxCommandLibrary

gcpdiag

Google Cloud Platform diagnostics tool

TLDR

Run lint checks

$ gcpdiag lint --project [project_id]
copy
Run with specific rule
$ gcpdiag lint --project [project_id] --include [gke/ERR/2021_001]
copy
Run excluding rules
$ gcpdiag lint --project [project_id] --exclude [gke/*]
copy
Output as JSON
$ gcpdiag lint --project [project_id] --output json
copy
Enable verbose output
$ gcpdiag lint --project [project_id] --verbose
copy

SYNOPSIS

gcpdiag lint [options]

DESCRIPTION

gcpdiag is a command-line diagnostics tool for Google Cloud Platform that runs automated checks against projects to identify common issues. It analyzes infrastructure for misconfigurations, quota problems, permission errors, and best practice violations.
The tool executes a curated set of rules organized by service (GKE, Compute Engine, Cloud SQL, etc.). Each rule checks for specific known issues based on Google's internal troubleshooting knowledge. Results indicate whether checks passed, failed, or were skipped, with detailed explanations and remediation guidance.
gcpdiag reduces troubleshooting time by proactively identifying issues before they cause outages. It's particularly useful for validating new deployments and investigating production problems.

PARAMETERS

--project id

Google Cloud project ID.
--include pattern
Include rules matching pattern.
--exclude pattern
Exclude rules matching pattern.
--output format
Output format (text, json).
--verbose
Verbose output.
--auth-adc
Use Application Default Credentials.

SUBCOMMANDS

lint

Run diagnostic checks.

SEE ALSO

gcloud(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community