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:
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
-
To get the permissions that you need to create and modify custom dashboards by using the Google Cloud console, ask your administrator to grant you the Monitoring Editor (
roles/monitoring.editor
) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.You might also be able to get the required permissions through custom roles or other predefined roles.
For more information about roles, see Control access with Identity and Access Management.
You can put up to 40 widgets on a dashboard.
Add alerting policies to a dashboard
To display the chart for an alerting policy on a dashboard, do the following:
-
In the Google Cloud console, go to the Dashboards page:
If you use the search bar to find this page, then select the result whose subheading is Monitoring.
- Select a dashboard or click Create dashboard.
- In the toolbar, click add Add widget.
- In the Add widget dialog, select Alerting Policy.
- Click arrow_drop_down Alerting policy, and then select an alerting policy.
- 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_vert 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:
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:
-
In the Google Cloud console, go to the Dashboards page:
If you use the search bar to find this page, then select the result whose subheading is Monitoring.
- Select a dashboard or click Create dashboard.
- In the toolbar, click add Add widget.
- In the Add widget dialog, select Incidents.
- Optional: Add a title.
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.
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_list 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:
- Charts, tables, and indicators
- Log entries
- Descriptive text
- Service-level objectives (SLOs) for a set of services
For information about exploring charted data and filtering your dashboards, see the following documents: