Building Charts

This guide introduces Monitoring charts. There are two ways to build charts:

  • Building an ad-hoc chart using Metrics Explorer.
  • Creating a chart to be added to a dashboard.

Charts created for dashboards are persistent; they become part of a set of monitoring tools. Charts built with Metrics Explorer are transient and used for investigating specific issues. The techniques for building them are the same.

Charts can display any metric type collected by your project, including custom metrics.

The following screenshot shows a chart that displays a CPU usage metric:

CPU-usage chart with legend

As seen in this screenshot, each time series in the charted metric shows up as a colored line. Each of these is keyed by color to an entry in the legend under the chart that displays the name of each time series.

Before you begin

Building a new chart with Metrics Explorer

Metrics Explorer lets you build ad-hoc charts for any metric collected by your project. You can use this to explore data you that you may not necessarily need on a dashboard. Charts built with Metrics Explorer cannot be saved to dashboards, but you can create a URL to the chart so it can be shared.

To build a new chart using Metrics Explorer:

  1. On the Stackdriver Monitoring console, go to the Resources > Metric Explorer page:

    Go to the Metrics Explorer page

  2. Select the desired Stackdriver account from the list at the top of the page:

    Selecting a Stackdriver account

Creating a new chart for a dashboard

Dashboards typically display a set of related charts that you want to have available at all times. These resources can include charts, uptime checks, alerts, and others.

To create a new chart on a dashboard, click the Add Chart button on the far right of the dashboard toolbar:

Dashboard toolbar

When you are done designing the chart, click the Save button to add it to the dashboard. You can put up to 25 charts on a dashboard.

Designing charts

Whether you are creating a chart to be installed on a dashboard or building an ad-hoc chart in Metrics Explorer, the chart-definition interface is nearly identical.

The process of designing a chart involves two tasks:

  • Specifying the data to appear on the chart.
  • Configuring the appearance of the chart.

These task are indicated by the two tabs on a chart-definition page (that is, either the Add Chart page or the Metrics Explorer page), as seen in the following screenshot, taken from the Add Chart page:

Chart-definition tabs

  • The Metric tab is where you specify the metrics that you want to appear on the chart; this is covered in Selecting Metrics.
  • The View options tab is where you specify the appearance of the chart itself; this is covered in Setting View Options.

In addition, a chart on a dashboards gets a name; this is represented by the Untitled value in the screenshot. Charts in Metrics Explorer do not have names; this field does not appear on the Metrics Explorer page. See Titling charts for more information about titling charts on dashboards.

After you have added a chart to a dashboard, you can edit it using the same interface.

Interacting with charts

Charts in Monitoring are dynamic constructs, not static images. There are many ways to interact with the charts, whether they are on a dashboard or built in Metrics Explorer; these are described in Working with Charts.

Titling charts

When adding a chart to a dashboard, you can associate a title with the chart. The user interface offers suggestions for titles, based on the metrics specified for the chart, but you can also provide your own. The following screenshot shows a user-provided title as well as a system-suggested title:

Titling a chart

If you want to adopt the suggested title, simply click on the blue text in the suggestion. If you change your mind, you can always replace it later. If you had your own title and accidentally clicked on the suggestion, you can undo it with a Control-Z sequence.

The performance of charts and dashboards depends in part of the amount of data each displays. In order to keep the performance within acceptable ranges, the following limits apply to charts:

Category Value
Charts on a dashboard 25
Lines on a chart 300
Was this page helpful? Let us know how we did:

Send feedback about...

Stackdriver Monitoring