Cloud Monitoring provides predefined dashboards for the Google Cloud services that you use. These dashboards require no setup or configuration effort.
You can also create custom dashboards that display the content you select.
When designing a custom dashboard, you have the option to start with an
empty dashboard and add just those widgets of interest to you, or you can
install a dashboard configuration that is stored in GitHub and then modify that
configuration to meet your needs. You can
create custom dashboards by using the Google Cloud Console or by
Dashboard endpoint in the Cloud Monitoring API.
This page describes the following:
- What you can display on a dashboard.
- The quotas and limits applicable to dashboards.
- The authorization necessary to create and modify dashboards.
- How you can improve the performance of your charts and dashboards.
For information about how to create and manage dashboards, see the following pages:
- To manage your dashboards by using the Google Cloud Console, see Managing dashboards through the console.
- To manage your dashboards by using the Cloud Monitoring API, see see Managing dashboards by API.
- To install a dashboard configuration that is stored in GitHub, see Installable dashboards.
This section provides examples of the widgets that you can add to a custom dashboard.
- If you use the Cloud Monitoring API, you can create and modify all widget types.
If you use the Google Cloud Console, there are two dashboard editors available to you: Legacy Dashboard Editor and Dashboard Editor. Both editors can display all widget types. Both editors can be used to create and configure line charts, area charts, bar charts, and heatmap charts. To create or edit gauge, scorecard, or text widget, you must use the Dashboard editor.
The Legacy dashboard editor displays widgets on a grid. The Dashboard editor supports the grid layout; however, it also supports the mosaic layout which lets you control the size and positioning of the widgets.
To display your time series with the highest possible resolution, use a line chart or a stacked area chart. By default, line charts assign a unique color to each time series that is displayed. However, you can configure these charts to only show outliers, display statistical measures such as the "50th percentile", or display the data in x-ray mode. For more information on these options, see Setting view options.
The following screenshot is an example of a line chart in color mode:
Stacked area chart
To display the sum of all time series, with the contribution of each time series illustrated by a unique band of color, use a stacked area chart. You can configure these charts to display only outliers. By placing your pointer on the chart, you can view how much a specific time series contributes to the sum.
The following screenshot is an example of a stacked area chart in color mode.
Stacked bar chart
To display data with infrequent samples, such as those quota metrics that have one sample per day, use stacked bar charts. These charts are lower resolution than line charts and stacked area charts. By default, each time series is assigned a unique color; however, you can configure these charts to display only outliers.
The following screenshot is an example of a stacked bar chart in color mode:
To display metrics with a distribution value, use heatmap charts. Heatmaps use color to represent the values in the distribution. With heatmaps, you can overline percentile lines and you can configure these charts to only display outliers.
The following image displays the request latencies for the Cloud Spanner API in one Google Cloud project:
For an in depth discussion of these charts, see Charting distribution metrics.
If you want to view the most recent measurement as compared to a color-coded set of thresholds, then create a gauge. As illustrated in the following screenshot, a gauge displays two lines: a thin outer arc that displays the range of possible value and uses color to indicate warning and danger zones, and a thick inner arc that indicates the current value:
A gauge displays the current value as a number and it displays a thick line below the two arcs. The color of the background and of the thick line indicate if current value is in the good, warning, or danger zone. In this example, the current value is in the good zone, so the line is green and the background is white.
If you want to view the most recent measurement as compared to a
set of thresholds, along with a history of recent measurements, then
create a scorecard. For example, the following
screenshot illustrates a scorecard configured to display as a
Scorecards display the current value as a number. If you select a
view, then these charts also include a thin line that shows the
history of recent measurements, and a thick line. The color of the background
and of the two lines indicate if the current value is in the good, warning, or
danger zone. In this example, the current value is in the good zone, so the lines
are green and the background is white.
Text boxes are designed to let you add information to the dashboard. The content might be information about the dashboard, links to relevant resources, or what to do in different situations. For example, the following screenshot illustrates a text box.
Text boxes can include links to external resources.
Quotas and limits
The following limits apply to dashboards and charts:
|Dashboards per Workspace||1000|
|Charts on a dashboard||25|
|Lines on a chart||300|
This section describes the roles or permissions needed to create a dashboard or to add charts to a dashboard. For detailed information about Identity and Access Management (IAM) for Cloud Monitoring, see Access control.
Each IAM role has an ID and a name. Role IDs have the
roles/monitoring.editor and are passed as arguments to the
gcloud command-line tool when configuring access control. For more information, see
Granting, changing, and revoking access.
Role names, such as Monitoring Editor, are displayed by the
Required Cloud Console roles
To create a dashboard or to add charts to a dashboard, your IAM role name for the Google Cloud project must be one of the following:
- Monitoring Editor
- Monitoring Admin
- Project Owner
To view a list of roles and their associated permissions, see Roles.
Required API permissions
To use the Cloud Monitoring API to create a dashboard or to add charts to a dashboard, your IAM role ID for the Google Cloud project must be one of the following:
roles/monitoring.dashboardEditor: This role ID grants the minimal permissions that are needed to create a dashboard or to add charts to a dashboard. For more details on this role, see Predefined dashboard roles.
Determining your role
To determine your role for a project by using the Cloud Console, do the following:
Open the Cloud Console and select the Google Cloud project:
To view your role, click IAM & admin. Your role is on the same line as your username.
To determine your organization-level permissions, contact your organization's administrator.
Performance of dashboards and charts
The performance of a chart is sensitive to the number of time series to be displayed. The number of time series depends, in part, on the structure of the metric type and monitored-resource type associated with the time series. Each of these types has a number of labels; the Metrics list and Monitored resource list include the labels for each metric and monitored-resource type.
There is one time series for each unique combination of values for the set of labels. The number of possible combinations is called the cardinality. For more information on labels, values, and cardinality, see Cardinality.
If you encounter performance issues when displaying metric data, you can often mitigate the issues by using one of the techniques:
- Removing unnecessary information by filtering.
- Collapsing related information together by combining time series.
- Focusing on unusual data with outlier mode.
- Reducing the cardinality of a custom metric by reducing the number of labels or the range of values possible for a label.