[[["易于理解","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-02-18。"],[[["\u003cp\u003eYou can use Cloud Monitoring to set up alerts for quota usage, such as receiving notifications when usage reaches a specific percentage of the maximum value.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Quotas dashboard allows creating usage alerts directly from the \u003cstrong\u003eQuotas & System Limits\u003c/strong\u003e page, where you can also configure the notification channel for these alerts.\u003c/p\u003e\n"],["\u003cp\u003eThe Metrics Explorer in Cloud Monitoring enables the creation of charts to visualize Cloud Quota metrics, such as selecting "Consumer Quota" as the resource and choosing specific quota metrics.\u003c/p\u003e\n"],["\u003cp\u003eCloud Monitoring offers advanced tools to monitor quota usage and create custom dashboards, such as combining metrics with filters and aggregations to gain deeper insights.\u003c/p\u003e\n"],["\u003cp\u003eQuota metric support varies by service; you can verify whether a service supports these metrics by checking if "Consumer Quota" is an available option when creating a chart or alert policy.\u003c/p\u003e\n"]]],[],null,["# Set up quota alerts and monitoring\n\nYou can set up quota usage alerts and monitoring by using\n[Cloud Monitoring](/cloud-monitoring). This document describes how to set up\nalerts, create charts, and find more information about using Cloud Monitoring\nfor Cloud Quotas.\n\nSet up basic quota usage alerts\n-------------------------------\n\nThe Cloud Quotas dashboard is integrated with\n[Cloud Monitoring](/monitoring/docs/monitoring-overview). You\ncan set up quota alerts from the\n**IAM \\& Admin \\\u003e Quotas \\& System Limits** page to get\nnotifications of quota events. For example, you can set up an alert to notify\nyou when your quota usage reaches a percentage of the maximum value. This\nfeature is only supported for project-level quotas.\n\nTo set up an alert for a specific quota or system limit, do the following:\n\n1. Make sure that you have\n [permissions to create alerts](/docs/quotas/permissions#permissions_create_alert)\n\n2. In the Google Cloud console, go to the\n **IAM \\& Admin \\\u003e Quotas \\& System Limits** page:\n\n\n [Go to Quotas \\& System Limits](https://console.cloud.google.com/iam-admin/quotas)\n\n \u003cbr /\u003e\n\n3. In the right-most column of the table, click more_vert **More\n actions** , and then select **Create usage alert** . The **Alert policy\n templates** pane opens.\n\n4. Under **Configure notifications**, select your notification channel. The\n notification channel is how you receive the alert---for example email,\n SMS, or Pub/Sub.\n\n5. Click **Create**.\n\nCreate charts\n-------------\n\nThe Cloud Monitoring metrics explorer lets you create charts to view metrics.\nYou can use it to view metrics related to Cloud Quotas.\n\n\u003cbr /\u003e\n\nTo view the metrics for a monitored resource by using the\nMetrics Explorer, do the following:\n\n1. In the Google Cloud console, go to the\n *leaderboard* **Metrics explorer** page:\n\n [Go to **Metrics explorer**](https://console.cloud.google.com/monitoring/metrics-explorer)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Monitoring**.\n2. In the toolbar of the Google Cloud console, select your Google Cloud project. For [App Hub](/app-hub/docs/overview) configurations, select the App Hub host project or the app-enabled folder's management project.\n3. In the **Metric** element, expand the **Select a metric** menu, enter `quota usage` in the filter bar, and then use the submenus to select a specific resource type and metric:\n 1. In the **Active resources** menu, select **Consumer Quota**.\n 2. In the **Active metric categories** menu, select **Quota**.\n 3. In the **Active metrics** menu, select a metric from the list. To display both active and inactive metrics, click **Active** to clear the filter in the **Select a metric** menu.\n 4. Click **Apply**.\n4. To remove time series from the display, use the\n [**Filter** element](/monitoring/charts/metrics-selector#filter-option).\n\n5. To combine time series, use the menus on the\n [**Aggregation** element](/monitoring/charts/metrics-selector#select_display).\n For example, to display the CPU utilization for your VMs, based on their zone, set the\n first menu to **Mean** and the second menu to **zone**.\n\n All time series are displayed when the first menu of the **Aggregation** element is set\n to **Unaggregated** . The default settings for the **Aggregation** element\n are determined by the metric type you selected.\n6. For quota and other metrics that report one sample per day, do the following:\n 1. In the **Display** pane, set the **Widget type** to **Stacked bar chart**.\n 2. Set the time period to at least one week.\n\n| **Note:** Quota values are updated once per day. Changes to values can take up to 24 hours to be updated in the Google Cloud console.\n\nAfter you've found the quota usage information you want, you can use\nCloud Monitoring to create custom dashboards and alerts. For more\ninformation, see [Do more with Cloud Monitoring](#do-more).\n\nCheck quota metric support\n--------------------------\n\nNot all services support quota metrics in Cloud Monitoring. To see\napplicable quota metrics for supported services, select **Consumer Quota** as\nthe resource type when building a chart or creating an alerting policy. Services\nthat don't support quota metrics aren't displayed.\n\n- Common services that support quota metrics include Compute Engine,\n Dataflow, Spanner, Pub/Sub, Cloud Vision,\n Speech-to-Text, Cloud Monitoring, and Cloud Logging.\n\n- Common services that don't support quota metrics include App Engine and\n Cloud SQL.\n\nGet metric names\n----------------\n\nQuotas and system limits have two types of names: display names and metric\nnames. Display names have spaces and capitalization that make them easier for\nhumans to read. Metric names are more likely to be lowercase and delimited by\nunderscores instead of spaces; the exact format depends on the service.\n\nThe following instructions show how to get quota and system limit metric names\nusing either the Google Cloud console or gcloud CLI. \n\n### Console\n\n1. In the Google Cloud console, go to the\n **IAM \\& Admin \\\u003e Quotas \\& System Limits** page:\n\n\n [Go to Quotas \\& System Limits](https://console.cloud.google.com/iam-admin/quotas)\n\n \u003cbr /\u003e\n\n The table on this page displays quotas and system limits that have usage or\n have adjusted values, and a reference entry for other quotas. The reference\n entry has the word \"default\" in parentheses at the end of the listing in\n the **Name** column. For\n example, `SetIAMPolicy requests per minute per region (default)` is the\n reference entry for the quota\n `SetIamPolicyRequestsPerMinutePerProject`.\n2. If you don't see the **Metric** column, take the following steps.\n\n 1. Click view_column **Column display options**.\n 2. Select **Metric**.\n 3. Click **OK** . The **Metric** column appears in the table.\n\nThe **Metric** column shows the metric names. To filter the results, enter a\nproperty name or value in the field next to\nfilter_list **Filter**.\n\n### gcloud\n\nTo get the metric names for a Google Cloud service by\nusing the gcloud CLI, run the `quotas info list`\ncommand. To skip lines that don't list metric names, pass the output to a\ncommand such as `grep` with `metric:` as the search term, or use the\ngcloud CLI\n[`--format`](/sdk/gcloud/reference#--format) flag: \n\n gcloud beta quotas info list --project=\u003cvar translate=\"no\"\u003ePROJECT_ID_OR_NUMBER\u003c/var\u003e \\\n --service=\u003cvar translate=\"no\"\u003eSERVICE_NAME\u003c/var\u003e --format=\"value(metric)\"\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID_OR_NUMBER\u003c/var\u003e: the project ID or project number.\n- \u003cvar translate=\"no\"\u003eSERVICE_NAME\u003c/var\u003e: the name of the service whose quota metrics you want to see---for example, the service name for Compute Engine is `compute.googleapis.com`. Include the `googleapis.com` portion of the service name.\n\nDo more with Cloud Monitoring\n-----------------------------\n\nThe [Cloud Monitoring](/cloud-monitoring) tools let you monitor quota usage,\nvalues, and errors in depth. You can use these metrics to create custom\ndashboards and alerts. For example, you can view quota usage over time or\nreceive an alert when you're approaching your quota value.\n\nCloud Monitoring supports a wide variety of metrics that you can combine\nwith filters and aggregations for new and insightful views into your quota\nusage. For example, you can combine a metric for allocation quota usage with a\n`quota_metric` filter on Cloud TPU names.\n\nPricing for Cloud Monitoring is described in the\n[Google Cloud Observability pricing](https://cloud.google.com/stackdriver/pricing)\ndocument.\n\nThe [Cloud Monitoring documentation](/monitoring/docs/monitoring-overview)\nis extensive, so here are a few documents to get you started:\n\n- [Building charts](/monitoring/charts): A comprehensive guide to creating charts and tables, and adding them to a custom dashboard.\n- [Introduction to alerting](/monitoring/alerts): An overview covering how alerting works and what your options are for creating an alert policy.\n- [Managing alerting policies](/monitoring/alerts/manage-alerts): A guide to various management tasks for your existing alerting policies---for example, view a policy, edit a policy, delete a policy, or add a policy to a dashboard.\n- [Using quota metrics](/monitoring/alerts/using-quota-metrics): A detailed document dedicated to quotas use cases, with examples covering topics such as how to create alerts for `quota/exceeded` errors.\n- [Google Cloud metrics guide](/monitoring/api/metrics_gcp_p_z#gcp-serviceruntime): A metrics reference document. The `serviceruntime` section lists the quotas metrics used for monitoring."]]