Create and manage custom dashboards

This document describes how to create and manage custom dashboards by using the Google Cloud console. Custom dashboards let you display information that is of interest to you, organized in a way that's useful to you. For example, you might create a dashboard to display the logs, performance metrics, and alerting policies for virtual machines (VM) in your production environment. After you create a custom dashboard, you can also copy, modify, and share it. To create custom dashboards, you can use the Google Cloud console, the Cloud Monitoring API, or the Google Cloud CLI.

Custom dashboards support a variety of widget types, so that you can choose the best way to display your metric data. These dashboards also let you display metric data from multiple Google Cloud projects and metrics from multiple Google Cloud services. In addition to metrics, custom dashboards can display log entries from multiple Google Cloud projects and alerting policies, and you can create template variables to filter your dashboard.

This document describes how to create and manage your custom dashboards by using the Google Cloud console:

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.

Create a dashboard

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards.
  3. In the Dashboards Overview page, click Create dashboard.
  4. The visualizations you can add to dashboards are collectively called widgets. For each widget that you want to add to the dashboard, do the following:

    1. Select a widget from the Chart library, or drag one from the library to the graph area.

      A preconfigured widget of the selected type is displayed. The following example illustrates a Line chart and its configuration pane:

      Example of a line chart.

    2. To change the time series shown by the widget, select the type configuration that you want to do, and then complete the form. For example, to minimize the number of fields that you need to complete, select the Basic tab, and then use the menus on that tab to configure the widget. For information about your choices, see Add dashboard widgets.

View a dashboard

Custom dashboards are displayed in the same list as the service-specific dashboards that Cloud Monitoring creates as you add resources to your Google Cloud project.

To view a custom dashboard, do the following:

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards.
  3. Optional: In the Categories pane, select the dashboard category:

    • G​C​P: List Google Cloud dashboards.
    • Integrations: List of third-party dashboards.
    • Custom: List custom dashboards.
  4. Optional: Add filters to the filter bar. When you add multiple filters and don't include the OR operator between two filters, a logical-AND joins the filters.

  5. Select the dashboard name.

For information about how to filter custom dashboards, see Filter a custom dashboard.

Modify a custom dashboard

Modify a dashboard when you want to add or remove widgets, change the layout of the dashboard widgets, change a widget's type, or change the time series shown by a widget.

To modify a custom dashboard, do the following:

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. If the Edit dashboard button is shown, then click it.
  4. Modify the dashboard by doing any of the following:

    • To add a widget, click Add chart, select the widget of interest, and complete the dialog. For more information, see Add dashboard widgets.

    • To modify the time series shown by an existing widget, select that widget and then make your changes by using the widget's configuration pane. For information about how to configure a widget, see Add dashboard widgets.

    • To modify a widget or the dashboard by editing the JSON representation, click JSON editor. After your changes are complete, click Apply changes in the editor's toolbar.

      When you open the JSON editor after selecting a widget, the JSON editor expands only that widget's representation. To view the entire dashboard definition, in the JSON editor select Show more:

      Illustrate the expand button on the JSON editor.

    • To change a widget's type, click the name of the current widget and then make a selection from the menu. For example, to change a line chart to a stacked area chart, click Line chart and select Stacked area chart from the menu. For more information, see Change a widget's type.

    • To delete a widget, click Delete in the widget's toolbar.

    • To resize or reposition a widget, use your pointer. These options are disabled when a dashboard is in grid mode.

    • To change the layout of widgets on the dashboard, use the Grid and Mosaic toggle. When you select Grid, all widgets have the same dimensions.

Delete a custom dashboard

Deleting a dashboard that contains alert charts doesn't delete the alerting policies whose data was displayed on those alert charts. Therefore, you might receive notifications from those policies after the dashboard is deleted. For information about how to manage your policies, which you do from the Alerting page in the Google Cloud console, see Manage policies.

To delete a custom dashboard, do the following:

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards.
  3. To begin the delete action, find the dashboard you want to delete and click Delete.
  4. In the confirmation dialog, click Delete

Copy a custom or integration dashboard

You can duplicate dashboards that you create, and you can copy them from one project to another. This section describes these options.

Duplicate a dashboard

When you want to experiment with different metrics or different aggregation options, one option is to duplicate a dashboard and use the copy for experimentation purposes.

To duplicate a dashboard, do the following:

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards.
  3. In the Dashboards Overview page, identify the dashboard to copy, and then click Copy.
  4. Click Copy in the confirmation dialog.

Copy a custom to another project

When you have multiple Google Cloud projects and you want them to have the same custom dashboard, you can create the dashboard in one project and then copy it to other projects. The copy has the same layout and properties as the source dashboard; however, the data the copy displays is different.

To copy a dashboard from one project to another, your IAM role for the destination Google Cloud projects must include the Monitoring editor permission. For more information about roles, see Control access with Identity and Access Management.

To copy a dashboard definition to another Google Cloud project, do the following:

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. Copy the dashboard definition to your clipboard:

    1. If the Edit dashboard button is shown, then click it.
    2. In the dashboard toolbar, click JSON editor to open the JSON editor.
    3. In the editor's toolbar, click Copy.
  4. Paste the definition into a new dashboard created in a different project:

    1. Use the Google Cloud console project picker to select the project where you want to save the dashboard definition.
    2. Click Create dashboard.
    3. In the dashboard toolbar, click JSON editor to open the JSON editor.
    4. Paste the content of your clipboard into the editor.
    5. Click Apply changes.

Share a custom dashboard

You can share a dashboard that you are viewing and you can share the definition, or the layout, of a dashboard. This section describes these options.

Share a dashboard

When you are investigating a data anomaly, you might want another individual in your team or your organization to view the same data that you are viewing. For example, you might see an unexpected drop, or spike, in a performance metric and you want to consult with a teammate. In this scenario, you want your teammate to view the dashboard and its data.

For information about how share a link to a dashboard, see Share a custom dashboard.

Share a custom dashboard definition

You might have created a custom dashboard that others in your team or organization want to install in their projects. When you want to share a dashboard definition, save it to your local system, and then move or copy the definition to a shared location. For example, you might copy the definition to a shared drive or to a source code repository like GitHub. Any individual with access to the stored location can install the dashboard into their Google Cloud projects.

To save the definition of a custom dashboard to a JSON-formatted file that is stored on your local system, do the following:

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. If the Edit dashboard button is shown, then click it.
  4. In the dashboard toolbar, click JSON editor to open the JSON editor.
  5. To save the dashboard definition to a local system, click File download:

    The created file, named for the dashboard, contains a JSON representation of the dashboard. This file only stores the definition of the dashboard, it doesn't store time-series data.

Install a dashboard definition

To use or customize a dashboard that someone else created, install that dashboard's definition in your Google Cloud project. Cloud Monitoring, for example, provides a curated set of dashboard definitions on GitHub that are specific to various Google Cloud services. The charts on these dashboards present a selection of metrics relevant to a specific service. You can install these definitions in your Google Cloud project as custom dashboards and then modify them to show the data you want to view.

For more information, see Install sample dashboards.

Configure data refresh

The dashboard toolbar displays a button that indicates whether auto refresh is enabled, , or disabled, . To change the state, click the button.

Enable automatic saving of configuration changes

By default, dashboards don't save your changes. To enable auto-save, click the Autosave toggle until it is the On position. When Cloud done is displayed, your changes have been saved.

What's next