Display alerting policies and incidents on a dashboard

This document describes how you can add the chart associated with an alerting policy and information about incidents to your custom dashboard. The chart for an alerting policy displays the time series that the policy monitors, a threshold, the number of open incidents associated with the policy, and whether the policy is disabled. The following screenshot illustrates a chart for an alerting policy:

Example of a chart for an alerting policy.

The information in this document is for the Google Cloud console. For information about using the Cloud Monitoring API, see the following documents:

Before you begin

Add alerting policies to a dashboard

To display the chart for an alerting policy on a dashboard, do the following:

  1. In the Google Cloud console, go to the  Dashboards page:

    Go to Dashboards

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a dashboard or click Create dashboard.
  3. In the toolbar, click  Add widget.
  4. In the Add widget dialog, select Alerting Policy.
  5. Click Alerting policy, and then select an alerting policy.
  6. To apply your changes to the dashboard, in the toolbar, click Apply. To discard your changes, click Cancel.

View alerting policies

When you are viewing a chart for an alerting policy, you might want more information about the alerting policy. For example, you might want to review the selected notification channels or what custom documentation is included with a notification. To get information about the alerting policy, try the following:

  • To access the alerting policy, click the incidents chip on the chart, and then select View alert policy.

  • To view details of the chart, place your pointer on the chart, click More chart options, and then select View in Metrics Explorer.

    Metrics Explorer displays a copy of the chart that is on your dashboard.

Delete alerting policies

If you delete an alerting policy, any charts associated with that policy stop displaying data. For more information, see Alerting policy widget doesn't display any data.

Display incidents on a dashboard

To view a table of incidents in the same context as your metric data, add an Incidents widget. Each row in an Incidents table lists information about one incident. That information includes the policy name, the condition name, and when the incident opened. The widget includes options that let you view the associated alerting policy and the incident details.

The following screenshot illustrates an Incidents widget:

Example of an **Incidents** widget.

The remaining information in this section is for the Google Cloud console. For information about using the Cloud Monitoring API, see Dashboard with an Incidents widget.

To display incidents on a dashboard, do the following:

  1. In the Google Cloud console, go to the  Dashboards page:

    Go to Dashboards

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a dashboard or click Create dashboard.
  3. In the toolbar, click  Add widget.
  4. In the Add widget dialog, select  Incidents.
  5. Optional: Add a title.
  6. Optional: Select the criteria that define which incidents are shown. By default, all incidents in the Google Cloud project are listed. However, you can restrict the widget to display incidents for specific alerting policies or for specific resources and metrics:

    • To display all incidents, use the default settings.

    • To display only incidents for specific alerting policies, select Alert policy and then make selections from the Alert policies menu.

    • To display only incidents for specific resource types, select Resource type and then make selections from the Resource types menu.

    You can't select specific alerting policies and specific resource types.

  7. To apply your changes to the dashboard, in the toolbar, click Apply. To discard your changes, click Cancel.

By default, only open incidents are shown. To show all incidents, including those that have closed within the timer interval specified by the time-range selector, place your pointer on the incidents widget to enable the toolbar, and then enable the Show closed incidents toggle.

You can sort the list of incidents by the opened or closed date. You can also search the list by using the Filter field.

View incident and alert policy details

When you are viewing an Incidents widget, you might want information about the alerting policy or the incident:

  • To view the details of the alerting policy associated with the incident, find that incident in the Incidents widget and then select the policy name.

  • To view the details of an incident, find that incident in the Incidents widget and click View.

What's next

You can also add the following widgets to your custom dashboards:

For information about exploring charted data and filtering your dashboards, see the following documents: