Working with charts

Charts are used in many places in Stackdriver Monitoring. Charts appear on dashboards, which can display multiple charts. Single charts appear in Metrics Explorer and in the interface for configuring alerting conditions.

All charts share a common user interface; you interact with them using the same techniques, regardless of where they appear. This page describes how to use charts to analyze and interact with your data. For information on creating charts, either to add to a dashboard or by using Metrics Explorer, see Creating charts.

Chart controls

Charts provide a variety of configuration controls; for example, you can display a chart in full-screen mode. The availability and location of some of the chart controls varies between dashboards and Metrics Explorer:

  • Dashboards display a dashboard toolbar, and each chart on the dashboard has a chart-specific toolbar. You can use the dashboard toolbar to define the default display behavior for all charts on the dashboard. You can use the chart toolbar to control how that specific chart is displayed. For more information, see Using dashboards.

  • Metrics Explorer displays a toolbar that is similar to the dashboard toolbar. It contains time range selectors and the ability to control how the chart is displayed. The chart always displays a legend and is updated as new data points are available.

  • Alerting policies display a chart for the alerting conditions. These charts don't show a legend and don't have individual controls.

For all charts, in addition to the chart and dashboard controls, you can use your pointer to do the following:

  • Display only a selected time interval or range of values.
  • Display selected time series.
  • Display the numeric values of the measurements.
  • Set a reference time.

The functions of the controls are discussed in subsequent sections.

Showing and hiding legends

You can show or hide the legends of all charts on a dashboard or of each chart individually:

  • To show or hide the legends of every chart in a dashboard, click Settings and then select Show all legends or Hide all legends.
  • To show or hide the legend of a particular chart, click Toggle Legend .

The following screenshot shows a chart with its accompanying legend:

Display a chart with a legend.

Each row in the legend contains a color, time-series labels, and a value:

  • Color: The chart and legend use color as the time-series identifier.
  • Labels: These include the metric and might include other information such as GCP project identifier or zone. To configure the displayed legend columns, click Setting on the legend heading.
  • Value: This field displays a measured value:

    • If you have set a reference time, the value field displays the measured value at the reference time.
    • If you haven't set a reference time and if your pointer is located somewhere on the graph, then the value field displays the measured value at the time indicated by your pointer.
    • Otherwise, value displays the most recent measurement.

The previous image illustrates the situation where there isn't a reference time and no pointer is placed on the graph. Therefore, the Value field displays the most recent server-latency measurement.

Highlighting data on the chart

You can examine individual time series by manipulating either the chart itself or the legend below it.

For example, suppose you see a spike on a chart in a specific time series, and you want to determine the value of that particular time series at the time of the spike. You can accomplish this in several different ways:

  • Place the pointer on the graph line at a specific point in time:

    • The selected line is highlighted, and the others are dimmed.
    • A tooltip lists a timestamp, each time series, and the value at that timestamp.
  • Place the pointer on the graph anywhere except on a specific graph line. In this case, the tooltip is displayed but no lines are highlighted or dimmed.

To view information at a different time, move your pointer horizontally to the desired time. When your chart is on a dashboard, placing your pointer on one graph results in all graphs displaying a dashed line at the same X-axis position.

The following screenshot illustrates the effect of placing the pointer on the halyard time series:

Display a chart with one line highlighted.

Setting a reference time

To select a reference time on a graph, you set a pin at the reference time. An unset pin appears on the graph when you place your pointer on the numbers along the X-axis. The unset pin is a light-gray line with an oval at its base that displays a time and a pin symbol.

When you set a pin the following occur:

  • A blue line with an oval at its base appears on the graph. The base displays the reference time and a Dismiss button. To remove the pin, click Dismiss.
  • The legend field Value displays the value of the time series at the reference time.
  • When the chart is on a dashboard, a pin is set on every chart on the dashboard.

You can only set one pin on a chart and you can either set the pin at the current time or at a specific time:

  • To set the pin at the current time, click Value in the legend heading of the chart.

  • To set the pin at a specific time, place your pointer at that time along the X-axis and then click the gray oval.

For example, the following screenshot illustrates a chart with a pin at 3:30 PM and a pointer at time 3:42 PM. The tooltip displays the timestamp that corresponds to the pointer position. The tooltip displays 440ms, which is the value of the time series server_latency at 3:42 PM. The legend displays 1.505ms, which is the value of the time series server_latency at 3:30 PM:

Display a chart with a time pin.

Focusing on a time series

To focus on a particular time series, click the corresponding row in the table or click the line in the graph. When you select a specific time series the following occur:

  • The graph is redrawn with the Y-axis determined by the range of values of the selected time series.
  • The selected time series is highlighted on the graph and in the legend.
  • Time series that aren't selected are dimmed and are drawn at the same scale as the selected time series.
  • The tooltip contains a section titled Selected Lines. This section displays the values of all selected lines at the top of the display.

For example, in the following screenshot, the halyard time series has been selected:

Display a rescaled chart with one line highlighted.

You can focus on more than one time series. To focus on another time series, click its row in the legend or click the corresponding line in the graph.

To stop focusing on a time series, click on its row in the legend or click on its line in the graph.

Changing the graph resolution

You can magnify a portion of the graph, either in the X or the Y direction, by using your pointer. After you have completed your analysis, you can revert the chart to its original state by clicking the dashboard control Reset Zoom . When you select a time period or a range of values, auto-refresh is automatically disabled.

To magnify the graph in a specific time interval, follow these steps:

  1. Place your pointer in the graph area at one end of the time interval that you want to view in more detail.
  2. Drag your pointer horizontally to the other end of the interval. This creates a gray region between two time selectors.

    After you release the pointer button, the graph is redrawn using the range of X-axis values that you selected. The Y-axis range is automatically adjusted based on the values in the time period you selected.

To magnify an interval of values, follow these steps:

  1. Place your pointer in the graph area at one end of the value range that you want to view in more detail.
  2. Drag your pointer vertically to the other end of the range. This creates a gray region between two values on the Y-axis.

    After you release the pointer button, the graph is redrawn using the Y-axis range that you selected.

To magnify a time interval and a range of values, perform a sequence of actions. For example, magnify the time interval and then select the range of values. You can perform these actions in any order.

To reset the X-axis and Y-axis to their values prior to your magnification actions, click Reset Zoom .

Setting the display period

The chart can display data for a range of periods, typically from 1 hour to 6 weeks.

On a dashboard, you can also specify a custom display period on the dashboard toolbar. This display period applies to all the charts on the dashboard. You can set the display period for isolated charts, like those in Metrics Explorer, as well.

Changing the time range on a chart changes the range of data shown; this can result in realignment of the time-series; see Alignment period for more information.

To change the range, select one of the Time options:

Show the dashboard toolbar.

For a new project, data may not be available for all parts of the range.

The following screenshot shows two charts from a dashboard. Note that the display period, on the X-axis, is shared across charts on a dashboard.

Show that all dashboard charts have the same X-axis.

Dynamic or static data

Charts display data within a window of time. By default, this window advances, wtih “now” always at the right edge of the chart. The width of the window into the past is determined by the time selection, for example, 1 hour. The data on the chart is dynamic; as new data is generated, it appears at “now”, and old data moves out of the window. By default, this behavior is enabled.

You can keep the time window from changing by turning off Auto Refresh, . This static option is is useful when you want to study an event in the past and not be distracted by new data. The Auto Refresh button turns red to warn you that the data is static.

Dashboards provide a single Auto Refresh control that applies all charts on the dashboard. When building a chart on the Resources > Metrics Explorer page, auto-refresh is always on. You can turn it off by editing the “share” URL.

Enlarging a chart

You can enlarge a single chart on a dashboard by clicking the Fullscreen button, , in the upper right area of the chart. The Fullscreen button on the dashboard toolbar affects the entire dashboard.

In full-screen mode, the icon on the button changes so that the corners point toward the center: . To exit full-screen mode, click the button again, or press the Esc key.

Other options

Charts on a dashboard have a context-dependent set of additional options. These are available on the Other options button, .

By clicking the Other options button, you can change the display mode of the chart and save an image of the chart as a PNG file. Additionally, if you have any alerting policies configured and the chart is showing metrics being monitored by those policies, you can view logs from this menu.

Setting the display mode

A chart provides multiple viewing modes, though not all of them may be available for every chart. For a given chart, the possible modes are:

  • Color
  • Statistics
  • X-Ray
  • Outlier

You set the chart mode when the chart is added to the dashboard or created in Metrics Explorer, and that initial mode acts as the default. Color mode is the most common mode. Outlier mode is available only when the chart is created; it is not available on the dashboard.

If you are looking at a chart on a dashboard, you can reset the chart mode by clicking the Other options button, , on the chart and selecting the desired mode. You can also set the mode for all charts on a dashboard from the dashboard Settings button, .

For more on using these other chart modes, see [Chart modes][chart-mode].

Altering, incidents, and logs

If you've configured any alerting policies, a chart displaying metrics involved in those policies provides a visual marker for unresolved incidents as a set of red dots directly above the chart. These are keyed to the time of their occurrence.

In this case, the Other options menu also provides a View logs option. Click this option to bring up the Stackdriver Logs Viewer. See Viewing logs for information on using the interface.

For information about setting up altering, see Using alerting policies and Using uptime checks.

هل كانت هذه الصفحة مفيدة؟ يرجى تقييم أدائنا:

إرسال تعليقات حول...

Stackdriver Monitoring
هل تحتاج إلى مساعدة؟ انتقل إلى صفحة الدعم.