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 dashboards, you can use the Google Cloud console, the Cloud Monitoring API, or the Google Cloud CLI.
This document describes how to create and manage your custom dashboards by using the Google Cloud console:
- For information about the API and the Google Cloud CLI, see Create and manage dashboards by API.
- For information about service-specific Google Cloud dashboards, see View Google Cloud dashboards.
This feature is supported only for Google Cloud projects. For App Hub configurations, select the App Hub host project or management project.
About custom dashboards
Custom dashboards support a variety of widget types, so you can choose the best way to display your data. By default, dashboards display all metric data that is available to your Google Cloud project. If you configure a metrics scope, then your dashboard can display metric data for multiple Google Cloud projects.
A custom dashboard can display all of the following:
- Charts and indicators.
- Log entries from multiple Google Cloud projects or log views.
- Incidents and charts for alerting policies.
- Service level objectives (SLOs).
- Text.
- Trace data.
You can improve the load time or usability of a dashboard by grouping widgets. For example, you might add sections to a dashboard. Alternatively, you might add widgets to a container which is either expanded or collapsed.
After you create a dashboard, you can add filters, variables, events, or user-defined labels:
Dashboard-wide filters apply to all widgets on the dashboard. These filters can be helpful when you are troubleshooting. For example, you can use these filters to display data only for a specific zone. For more information, see Add or remove filters.
Variables apply to selected widgets. For example, you can use a variable to modify the query issued by the widget, or to control the visibility of a widget. For more information, see Create and manage variables and pinned filters.
Events, such as the crash of a Google Kubernetes Engine Pod, can help you correlate data from different sources when you're troubleshooting an issue. For more information, see Show events on a dashboard.
Labels can help you locate dashboards based on the type of content they display. For example, you might add the label
prodto dashboards that display information about production systems. Similarly, you might add the labelstagingto indicate the dashboard displays information about staging systems.
Before you begin
Complete the following in the Google Cloud project where you want to create and manage dashboards:
-
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 to projects, folders, and organizations.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.
Add a custom dashboard to your project
There are different approaches that you can use to add a custom dashboard to your Google Cloud project:
- You can create a dashboard.
- You can copy, or duplicate, a dashboard.
- You can copy a dashboard from project to project.
- You can upload or install dashboards from a shared location.
- You can import a dashboard from Grafana.
For example, suppose you have multiple Google Cloud projects and you want them to define the same custom dashboard. For this situation, you might create the dashboard in one project and then download a template for the dashboard to your local system. Next, you can install that template in other Google Cloud projects.
Create a new dashboard
To create a custom dashboard, do the following:
-
In the Google Cloud console, go to the Dashboards page:
If you use the search bar to find this page, then select the result whose subheading is Monitoring.
- In the toolbar of the Google Cloud console, select your Google Cloud project. For App Hub configurations, select the App Hub host project or management project.
- In the Dashboards page, click Create custom dashboard.
To add widgets to your dashboard, do the following:
- In the dashboard toolbar, click add Add widget.
In the Add widget pane, select a widget to add to your dashboard.
You can select a widget based on the type of data to display or how you want to display the data. In all cases, a configuration pane is opened. For example, you can select the Metric widget and then set the visualization to Stacked area. Or, you can select the Stacked area widget and then select the metric.