After you create a custom dashboard, you might want to modify the dashboard. For example, you might want to convert a line chart, which displays every time series, to a stacked-area chart so that you can view the proportion each time series contributes to the sum.
This document describes how to change a widget's type, how to modify which time series a widget displays, and how to delete a widget by using the Google Cloud console. For information about how to manage custom dashboards by using the API, see Create and manage dashboards by API.
For information about how to add widgets to a dashboard, see the following documents:
- Add charts, tables, and indicators
- Display alert charts and incidents
- Display log entries
- Add text and group widgets
- Display service-level objectives (SLOs)
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.
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.
Change a widget's type
When a widget is displaying the correct data but not presenting it in the most useful way, consider changing the widget's type. For example, suppose you have a line chart on your dashboard. To view how each time series contributes to the sum, change that line chart to a stacked-area chart.
You can change a widget's type only if the destination widget can represent the data shown by the source widget. For example, you can always change a line chart into a stacked-area or stacked-bar chart. Similarly, you can always convert a gauge, which shows a single time series, into a line chart. However, you might not be able to convert a line chart, which can show multiple time series, into a gauge.
You can't change the type of an alert chart, a logs panel, or a collapsible group. You can't convert any widget to a logs panel or to a collapsible group widget.
To change a widget's type, do the following:
- In the Google Cloud console, select Monitoring
or click the following button:
Go to Monitoring - In the navigation pane, select
Dashboards, then select the dashboard that you want to view or edit.
- If the edit Edit dashboard button is shown, then click it.
Select the widget whose type you want to change, and then do one of the following:
To convert a line chart to an alert chart, click more_vert More options and select Convert to alert chart.
When you make this selection, the Create alert policy dialog opens and the metric, filter, and grouping selections from your chart are applied to the alerting condition. Complete the specification of the alerting policy and then click Create. For information about those steps, see Create an alerting policy.
You can convert line charts that display a single metric to alert charts. You can't convert line charts that display multiple metrics or a ratio of metrics to alert charts.
To perform any other conversion, in the configuration pane, click the name of the current widget type, and then make a selection from the menu. For example, to change a line chart to a stacked-area chart, click Line chart arrow_drop_down and then select Stacked area chart.
The menu lists all widget types that can display metric data; however, a widget type is disabled when it can't display the selected data. For example, when the charted metric isn't distribution valued, the heatmap option is disabled. Similarly, when the current widget displays multiple time series, the gauge and scorecard options are disabled.
Modify a widget's configuration
To change which time series a widget displays or to change how those time series are combined, modify the widget's configuration. For example, when a chart displays many time series, you can improve the chart's performance and visual clarity by grouping time series by one or more labels.
To modify a widget's configuration, do the following:
- In the Google Cloud console, select Monitoring
or click the following button:
Go to Monitoring - In the navigation pane, select
Dashboards, then select the dashboard that you want to view or edit.
- If the edit Edit dashboard button is shown, then click it.
- Select the widget to activate the widget's configuration pane.
Modify the widget by doing one of the following:
- To use the menu-driven interface, select the Basic tab or Advanced tab. When you select the Basic tab, most fields are automatically set with values that are appropriate for the selected metric.
- To use Monitoring Query Language (MQL), select the MQL tab.
To edit the JSON representation, click
JSON editor, and then click Apply changes after your changes are complete.
The JSON editor only expands the section of the file that applies to the currently selected widget. To view the entire dashboard definition, click arrow_forward_ios Show more:
Delete a widget
How quickly a dashboard displays data depends on the number of widgets the dashboard displays and on the number of time series each widget displays. To improve the performance of a dashboard, one option is to place rarely used widgets in a collapsible group widget and collapse the group. Data for widgets in a collapsed group is loaded at a lower priority than for other dashboard widgets. An alternative to using the collapsible group widget is to delete those widgets that you don't use.
Deleting an alert chart doesn't delete the alerting policy whose data was displayed on the chart. To delete an alerting policy, go to the Alerting page in the Google Cloud console. For information about how to delete a policy, see Manage policies. You can't delete an alerting policy from a custom dashboard.
To delete a widget, do the following:
- In the Google Cloud console, select Monitoring
or click the following button:
Go to Monitoring - In the navigation pane, select
Dashboards, then select the dashboard that you want to view or edit.
- If the edit Edit dashboard button is shown, then click it.
- Select the widget that you want to delete.
To delete a widget, select delete Delete.
When you delete a collapsible group, you also delete the widgets the group contains. To remove the only the grouping, select cancel Cancel.