Cloud Monitoring supports predefined dashboards and custom dashboards:
- Predefined dashboards are automatically installed for the Google Cloud services that you use. These dashboards aren't configurable.
Custom dashboards are those that you create or install:
The Dashboards page of the Google Cloud Console provides a curated list of dashboards that you can preview and then install.
If you have access to the JSON representation of a dashboard, for example, if it is stored in GitHub or on a local server, then you can install that dashboard by using the Cloud Console or the Cloud Monitoring API. The GitHub
monitoring-dashboard-samplesrepository contains dashboard definitions for a variety of Google Cloud services.
For any custom dashboard that you have in your Google Cloud project, you can download and copy that dashboard's definition. These capabilities let you share a dashboard definition with multiple projects.
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 definition, for example one that is stored in a GitHub repository, see Installing sample dashboards.
This section provides examples of the widgets that you can add to a custom dashboard.
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.
To display a summary of a single-condition alerting policy on your custom dashboard, add an alert chart. Alert charts display the time series that are monitored by the policy, a threshold, and chips that list the number of incidents associated with the policy and whether the policy is disabled.
The following screenshot illustrates an alert chart:
In this example, the alerting policy is monitoring the CPU usage of two
different virtual machines. The condition threshold, which is set to 50%, is
shown by the dashed red line. The green chip with the label
indicates that there are no open incidents for the alerting policy. If
you place your pointer on the incidents chip, then a dialog opens that
links to the underlying alerting policy.
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 metrics scope||1000|
|Charts on a dashboard||40|
|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.