Use the gcpdiag 
tool to discover and fix potential
delivery issues for pull subscriptions.
Use the gcpdiag 
tool
 
   gcpdiag 
 
is an open source tool. It is not an officially supported Google Cloud product.
You can use the gcpdiag 
tool to help you identify and fix Google Cloud
project issues. For more information, see the gcpdiag project on GitHub 
.
The gcpdiag 
tool helps you discover Pub/Sub
pull delivery issues by performing the following checks:
- Quota errors:Evaluates Logs Explorer logs to check for any quota errors in regions and zones.
- Throughput qualification:Performs checks on the delivery latency health of a subscription.
For a list of gcpdiag 
pull delivery evaluation steps, see Potential steps 
.
Run the gcpdiag 
command
 
 You can run the gcpdiag 
command from Google Cloud CLI or within
a Docker 
container.
Google Cloud console
- Complete and then copy the following command.
- Open the Google Cloud console and activate Cloud Shell. Open Cloud console
- Paste the copied command.
- Run the gcpdiagcommand, which downloads thegcpdiagdocker image, and then performs diagnostic checks. If applicable, follow the output instructions to fix failed checks.
 gcpdiag runbook pubsub/pull-subscription-delivery \
  --project= PROJECT_ID 
\
  --parameter subscription_name= SUBSCRIPTION_NAME 
 
 
Docker
You can run gcpdiag 
using a wrapper 
that starts gcpdiag 
in a Docker 
container. Docker or Podman 
must be installed.
- Copy and run the following command on your local workstation. curl https://gcpdiag.dev/gcpdiag.sh >gcpdiag && chmod +x gcpdiag 
- Execute the gcpdiagcommand../gcpdiag runbook pubsub/pull-subscription-delivery \ --project= PROJECT_ID \ --parameter subscription_name= SUBSCRIPTION_NAME
View available parameters for this runbook.
Replace the following:
- PROJECT_ID : The ID of the project to evaluate
- SUBSCRIPTION_NAME : The name of the subscription to evaluate in your project
Useful flags:
-  --universe-domain: If applicable, the Trusted Partner Sovereign Cloud domain hosting the resource
-  --parameteror-p: Runbook parameters
For a list and description of all gcpdiag 
tool flags, see the  gcpdiag 
usage instructions 
.

