Dashboards and charts

Dashboards are one way for you to view and analyze metric data that is important to you.

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 dashboards 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.

    • When the JSON representation of a dashboard is stored in GitHub or on a local server, you can install that dashboard by using the Cloud Console or the Cloud Monitoring API. The GitHub monitoring-dashboard-samples repository contains dashboard definitions for various 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:

Dashboard widgets

This section provides examples of the widgets that you can add to a custom dashboard.

Line chart

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 Set view options.

The following screenshot is an example of a line chart in color mode:

Example of a line chart in color mode.

Stacked area chart

To display the sum of the 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.

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:

Example of a stacked bar chart in color mode.

Heatmap chart

To display metrics with a distribution value, use heatmap charts. Heatmaps use color to represent the values in the distribution. To display percentile lines or outliers, you use the heatmap settings.

The following image displays the request latencies for the Cloud Spanner API in one Google Cloud project:

Example of a heatmap chart.

For an in-depth discussion of these charts, see Charting distribution metrics.

Alert chart

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 the policy monitors, 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:

Example of an alert chart.

In this example, the alerting policy is monitoring the CPU usage of two different virtual machines. The dashed line shows the condition threshold, which is set to 50%. The green chip with the label No incidents 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.

Gauges

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 the current value as a number, a thick horizontal line, and an arc with a thin line and a thick line:

Example of a gauge.

The thin line of the arc displays the range of possible values and uses color to indicate good, warning, and danger zones. In the previous screenshot, the thin line shows a gauge configured with all three zones. The thick line on the arc shows the current value. In the screenshot, the value is in the good zone and therefore the thick line is colored green. The color of the horizontal line matches the color of the thick line on the arc.

If the value of a gauge enters a warning or danger zone, then the background of the gauge changes from white to yellow or red.

Scorecards

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 SPARK_LINE:

Example of a scorecard.

Scorecards display the current value as a number. If you select a SPARK_LINE view, then these charts also include a thin line that shows the history of recent measurements, and a thick line. Whether the current value is in the good, warning, or danger zone determines the color of the two lines and the background. In this example, the current value is in the good zone, so the lines are green and the background is white.

Text boxes

Text boxes let you add information to the dashboard. The content of a text box might be information about the dashboard, links to relevant resources, or what to do in different situations. For following screenshot illustrates a text box:

Example of a dashboard with a text widget.

Text boxes can include links to external resources.

Quotas and limits

The following limits apply to dashboards and charts:

Category Value
Dashboards per metrics scope 1000
Charts on a dashboard 40
Lines on a chart 300

Authorization

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 form 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 Cloud Console.

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.
  • role/monitoring.editor
  • role/monitoring.admin
  • role/owner

To identify the permission required for a specific Cloud Monitoring API method, see Cloud Monitoring API permissions. To view a list of roles and their associated permissions, see Roles.

Determining your role

To determine your role for a project by using the Cloud Console, do the following:

  1. Open the Cloud Console and select the Google Cloud project:

    Go to Cloud Console

  2. 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 several 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.