[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-17。"],[],[],null,["# Monitor subscriptions within Pub/Sub\n\nYou can use the Google Cloud console to access the monitoring dashboard\nfor a single subscription or all the subscriptions available in your project.\n| **Key Point:** Learn how to access the monitoring dashboard for Pub/Sub subscriptions, understand some key metrics, and learn how to create a custom monitoring experience.\n\nBefore you begin\n----------------\n\nEnsure that you've prepared the following:\n\n- A Cloud Billing account\n\n- A Pub/Sub project with billing enabled\n\n- At least one topic with a subscription in your Pub/Sub project\n\n- Familiarity with [Cloud Monitoring](/monitoring/docs/monitoring-overview)\n and [Metrics Explorer](/monitoring/mql)\n\nView the monitoring dashboard for all subscriptions\n---------------------------------------------------\n\nTo view the monitoring dashboard for all the subscriptions\nin a project, perform the following steps:\n\n1. In the Google Cloud console, go to the Pub/Sub **Subscriptions** page.\n\n [Go to Subscriptions](https://console.cloud.google.com/cloudpubsub/subscription)\n2. Click the **Metrics** tab.\n\n The monitoring dashboard is displayed for all subscriptions in the project.\n\nThe monitoring dashboard has two sections: **Overview** and **Quota**.\n\nView the monitoring dashboard for a single subscription\n-------------------------------------------------------\n\nTo view the monitoring dashboard for a single subscription\nin a project, perform the following steps:\n\n1. In the Google Cloud console, go to the Pub/Sub **Subscriptions** page.\n\n [Go to Subscriptions](https://console.cloud.google.com/cloudpubsub/subscription)\n2. In the **Subscriptions** page, click any subscription.\n\n The subscription details page is displayed.\n3. Within the subscription details page, click the **Metrics** tab.\n\n The monitoring dashboard is displayed for the single subscription.\n\nThe monitoring dashboard has four sections: **Overview** , **Health** ,\n**Retention** , and **Pull** or **Push** , depending on your subscription type.\nYou can see the **Retention** section only if you enable message retention for\nthe subscription.\n\nCustomize the monitoring dashboard\n----------------------------------\n\nYou can create a custom dashboard or add individual charts to an\nexisting custom dashboard.\n\nTo create a custom dashboard, perform the following steps:\n\n1. Follow the steps to go to the monitoring page for [all subscriptions](#monitor_all_subscriptions) or for\n a [single subscription](#monitor_subscription).\n\n2. Choose one of the following options:\n\n - To create a new dashboard containing all the charts, or to add all the\n charts to an existing custom dashboard, click **Save as custom dashboard**.\n\n - To add a single chart to a new or custom dashboard, in an individual chart,\n expand the more_vert\n **More Actions** option and click **Add to custom dashboard**.\n\nYou can view all your dashboards in the [Monitoring](https://console.cloud.google.com/monitoring/dashboards/) console.\n\nModify a chart\n--------------\n\nTo modify a chart, perform the following steps:\n\n1. Follow the steps to go to the monitoring page for [all subscriptions](#monitor_all_subscriptions) or for\n a [single subscription](#monitor_subscription).\n\n2. In an individual chart, expand the more_vert\n **More Actions** option and click **View in Metrics Explorer**.\n\n The chart opens in **Metrics Explorer**.\n3. You can use [Monitoring Query Language](/monitoring/mql) queries to make changes to your\n chart and test the output.\n\n4. Click **Save chart** to save the changes.\n\nCreate an alerting policy\n-------------------------\n\nCreating an alerting policy for a chart lets you set up an alert that monitors the\nmetric, configure the circumstances under which you want to be\nalerted, and configure how you want to be notified.\n\nFor more information on how to create alerts, see [Create metric-based alert policies](/monitoring/alerts/using-alerting-ui).\n\nSome charts might not offer a **Create alerting policy** option.\nIn this case, perform the following steps:\n\n1. Save the chart to a custom dashboard.\n\n2. In the custom dashboard, for the individual chart, expand\n the more_vert **More Actions** option.\n\n3. Click **Convert to alert chart**.\n\nKey charts to monitor subscriptions\n-----------------------------------\n\nAlthough there are a number of charts available to monitor your subscription,\nthe following charts are a good starting point to check the\nstatus of a single subscription:\n\n- The **Oldest unacked message** chart in the\n **Health** section lets you check if any messages are taking a long time\n to be acknowledged after being published.\n\n- The **Unacked messages by region** chart in the **Overview** section lets you\n check the number of unacknowledged messages in each region for the subscription.\n\n- The **Delivery latency health score** chart in the **Health** section lets you\n check which factors may be contributing to an increased delivery latency. For\n more information about this metric, see\n [Monitor delivery latency health](/pubsub/docs/monitoring#delivery_latency_health).\n\nThe following chart in the **Quota** section help you monitor quotas for\nall the subscriptions in your project:\n\n- The **Administrator operations** chart lets you monitor administrative operations regarding subscriptions. Each administrator operation charges one unit against this quota.\n\nFor more information, see [Pub/Sub quotas and limits](/pubsub/quotas).\n\nWhat's next\n-----------\n\n- To monitor topics, see [Monitor topics within Pub/Sub](/pubsub/docs/monitor-topic).\n\n- To learn more about using MQL to build\n monitoring charts, see [Using the Query Editor](/monitoring/mql/query-editor).\n\n- To learn more about maintaining a healthy subscription, see [Maintain a healthy subscription](/pubsub/docs/monitoring#maintain_a_healthy_subscription)."]]