Metrics Explorer

Metrics Explorer is a stand-alone charting tool that lets you build charts for any (numeric) metric collected by your project. With Metrics Explorer, you can do all of the following:

  • Save charts to a custom dashboard.
  • Share charts by their URL.
  • View the JSON representation for charts.
  • Explore metric data that you don't need on a dashboard.

The following screenshot shows a metric charted on the Metrics Explorer page:

Metric charted using Metrics Explorer.

The Metrics Explorer interface consists of a configuration region and a chart region.

Configure Metrics Explorer

To configure Metrics Explorer to display metrics, do the following:

  1. In the Google Cloud Console, go to Monitoring or use the following button:

    Go to Monitoring

  2. In the Monitoring navigation pane, click Metrics Explorer.

  3. Specify the data to appear on the chart. You can use the Configuration tab or the MQL tab:

    Configuration tab

    To use the menu-driven interface, do the following:

    1. Ensure the Configuration tab is selected.
    2. Complete the Resource type and Metric boxes. You can select values from the menus or you can enter the name. You can complete these fields in any order.

      If you expand the Resource type menu and select Direct filter mode, then you can enter a metric filter expression. A metric filter describes a resource type, a metric, and filter settings in a compact form. You can use direct filter mode to verify the proper syntax for an API call or to verify that a metric filter is properly formatted.

      For more information, see Selecting metrics.

    3. (Optional) To specify a subset of data to display, add filters. To add a filter, click Add filter and complete the dialog. For more information, see Filter charted data.

    4. (Optional) To specify how multiple time series are combined and how each time series is processed, update the aggregation fields:

      • To group time series by a label, use the Group By field. Selecting a value for this field automatically selects a value for the Aggregator field.
      • To specify how multiple time series are combined, set the Aggregator field.
      • To configure how the individual time series are processed, click Advanced Options.

      For more information, see Choosing how to display charted data.

    MQL tab

    To use Monitoring Query Language (MQL), ensure that the MQL tab is selected and then enter your query. The following pages provide information about MQL:

  4. (Optional) To change the line-chart to a different display style, in the Metrics Explorer toolbar click Line chart and make a selection from the menu. For examples of all chart types, see Dashboard widgets.

  5. (Optional) To add a threshold to the chart, view only outliers, compare current data to past data, or change the color-setting, select Settings. For more information on your choices, see View options.

  6. (Optional) To display another metric, click Add another metric and complete the dialog. A chart can display a maximum of 10 metrics.

Save a chart for future reference

Metrics Explorer lets you create a chart that you can use to explore a metric. However, the charts created by this tool aren't persistent. If you navigate away from the Metrics Explorer page, the chart you've configured is discarded unless you save the chart to a custom dashboard or capture the chart's URL.

If you want to add the chart you've configured with Metrics Explorer to a custom dashboard, then do one of the following:

  • If you use the Google Cloud Console to manage your custom dashboards, then click Save Chart and complete the dialog. You can save the chart to an existing custom dashboard or you can create a dashboard.

  • If you use the Cloud Monitoring API to manage your custom dashboards, then you specify a JSON file that defines the dashboard layout and the structure of each widget that appears on the dashboard. To view the JSON representation of the chart being displayed in Metrics Explorer, click More options, and then select View as JSON. To save this representation in your clipboard, click Copy JSON.

    For detailed information about using the API to manage your custom dashboards, see Managing dashboards by API.

If you don't want to save the chart to a custom dashboard but you do want to keep a reference to the chart, then save the chart URL. Because the chart URL encodes the chart configuration, when you paste this URL into a browser the chart you configured is displayed.

To obtain the chart's URL, click More options, and then select Share by URL.

What's next