[[["易于理解","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-07-17。"],[],[],null,["# Display incidents and charts for alerting policies\n\nThis document describes how you can add the chart associated with an\nalerting policy and information about\nincidents to your custom dashboard. The chart for an alerting policy\ndisplays the time series that the policy monitors, a threshold, the number of\nopen incidents associated with the policy, and whether the policy is\ndisabled. The following screenshot illustrates a chart for an alerting policy:\n\nThe information in this document is for the Google Cloud console.\nFor information about using the Cloud Monitoring API, see the following\ndocuments:\n\n- [Create and manage dashboards by API](/monitoring/dashboards/api-dashboard).\n- [Dashboard with an `AlertChart` widget](/monitoring/dashboards/api-examples#dashboard_with_an_alert).\n\nThis feature is supported only for Google Cloud projects.\nFor [App Hub](/app-hub/docs/overview)\nconfigurations, select the App Hub host project or\nthe app-enabled folder's management project.\n\nBefore you begin\n----------------\n\nComplete the following in the Google Cloud project where you want to create and\nmanage dashboards:\n\n-\n\n To get the permissions that\n you need to create and modify custom dashboards by using the Google Cloud console,\n\n ask your administrator to grant you the\n\n\n [Monitoring Editor](/iam/docs/roles-permissions/monitoring#monitoring.editor) (`roles/monitoring.editor`)\n IAM role on your project.\n\n\n For more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\n You might also be able to get\n the required permissions through [custom\n roles](/iam/docs/creating-custom-roles) or other [predefined\n roles](/iam/docs/roles-overview#predefined).\n\n For more information about roles, see\n [Control access with Identity and Access Management](/monitoring/access-control).\n- You can put up to 100 widgets on a dashboard.\n\nAdd alerting policies to a dashboard\n------------------------------------\n\nTo display the chart for an alerting policy on a dashboard, do the following:\n\n1. In the Google Cloud console, go to the **Dashboards** page:\n\n [Go to **Dashboards**](https://console.cloud.google.com/monitoring/dashboards)\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. Select a dashboard or click **Create dashboard**.\n4. In the toolbar, click *add* **Add widget**.\n5. In the **Add widget** dialog, select **Alerting Policy**.\n6. Click *arrow_drop_down* **Alerting policy**, and then select an alerting policy.\n7. To apply your changes to the dashboard, in the toolbar, click **Apply** . To discard your changes, click **Cancel**.\n\n### View alerting policies\n\nWhen you are viewing a chart for an alerting policy,\nyou might want more information about\nthe alerting policy. For example, you might want\nto review the selected notification channels or what custom documentation\nis included with a notification. To get information about the alerting policy,\ntry the following:\n\n- To access the alerting policy,\n click the incidents chip on the chart, and then select\n **View alert policy**.\n\n- To view details of the chart, place your pointer on the chart,\n click *more_vert* **More chart options** , and then select\n **View in Metrics Explorer**.\n\n Metrics Explorer displays a copy of the chart that is on your\n dashboard.\n\n### Delete alerting policies\n\nIf you delete an alerting policy, any charts associated with that policy\nstop displaying data. For more information, see\n[Alerting policy widget doesn't display any data](/monitoring/charts/troubleshooting-charts#no-data-alert-chart).\n\nDisplay incidents on a dashboard\n--------------------------------\n\nTo view a table of incidents in the same context as your metric data, add\nan **Incidents** widget, which lists information about\nincident using a tabular format. For each incident, the widget\ndisplays the names of the alerting policy and condition, and when the\nincident opened. The widget includes options that let you view the\nassociated alerting policy and the incident details.\n\nThe following screenshot illustrates an **Incidents** widget:\n\nThe remaining information in this section is for the Google Cloud console.\nFor information about using the Cloud Monitoring API,\nsee [Dashboard with an **Incidents** widget](/monitoring/dashboards/api-examples#dashboard_with_incident_list).\n\nTo display incidents on a dashboard, do the following:\n\n1. In the Google Cloud console, go to the **Dashboards** page:\n\n [Go to **Dashboards**](https://console.cloud.google.com/monitoring/dashboards)\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. Select a dashboard or click **Create dashboard**.\n4. In the toolbar, click *add* **Add widget**.\n5. In the **Add widget** dialog, select **Incidents**.\n6. Optional: Add a title.\n7. Optional: Select the criteria that define which incidents are shown.\n By default, all incidents in the Google Cloud project are listed. However,\n you can restrict the widget to display incidents for specific alerting\n policies or for specific resources and metrics:\n\n - To display all incidents, use the default settings.\n\n - To display only incidents for specific alerting policies,\n select **Alert policy** and then make selections from the\n **Alert policies** menu.\n\n - To display only incidents for specific resource types,\n select **Resource type** and then make selections from the\n **Resource types** menu.\n\n You can't select specific alerting policies and specific resource types.\n8. To apply your changes to the dashboard, in the toolbar,\n click **Apply** . To discard your changes, click **Cancel**.\n\nBy default, only open incidents are shown. To show all incidents,\nincluding those that have closed within the timer interval specified by\nthe time-range selector, place your pointer on the incidents widget to\nenable the toolbar, and then enable the\n**Show closed incidents** toggle.\n\nYou can sort the list of incidents by the opened or closed date. You can\nalso search the list by using the *filter_list* **Filter** field.\n\n### View incident and alert policy details\n\nWhen you are viewing an **Incidents** widget, you might want\ninformation about the alerting policy or the incident:\n\n- To view the details of the alerting policy associated with the\n incident, find that incident in the **Incidents**\n widget and then select the policy name.\n\n- To view the details of an incident,\n find that incident in the **Incidents** widget\n and click **View**.\n\nWhat's next\n-----------\n\nYou can also add the following widgets to your custom dashboards:\n\n- [Charts, tables, and indicators](/monitoring/charts)\n- [Log entries](/monitoring/charts/view-logs)\n- [Descriptive text](/monitoring/dashboards/text-and-grouping)\n- [Service-level objectives (SLOs) for a set of services](/monitoring/dashboards/slos)\n\nFor information about exploring charted data and filtering your dashboards,\nsee the following documents:\n\n- [Explore charted data](/monitoring/charts/working-with-charts)\n- [Add temporary dashboard filters](/monitoring/charts/filter-dashboard)\n- [Create and manage variables and pinned filters](/monitoring/dashboards/filter-permanent)"]]