 Resource: Dashboard
 GridLayout
 Widget
 XyChart
 DataSet
 TimeSeriesQuery
 TimeSeriesFilter
 Aggregation
 Aligner
 Reducer
 PickTimeSeriesFilter
 Method
 Direction
 TimeSeriesFilterRatio
 RatioPart
 PlotType
 Threshold
 Color
 Direction
 Axis
 Scale
 ChartOptions
 Mode
 Scorecard
 GaugeView
 SparkChartView
 SparkChartType
 Text
 Format
 RowLayout
 Row
 ColumnLayout
 Column
 Methods
Resource: Dashboard
A Google Stackdriver dashboard. Dashboards define the content and layout of pages in the Stackdriver web application.
JSON representation  

{ "name": string, "displayName": string, "etag": string, // Union field 
Fields  

name 
Immutable. The resource name of the dashboard. 

displayName 
Required. The mutable, humanreadable name. 

etag 


Union field layout . A dashboard's root container element that defines the layout style. layout can be only one of the following: 

gridLayout 
Content is arranged with a basic layout that reflows a simple list of informational elements like widgets or tiles. 

rowLayout 
The content is divided into equally spaced rows and the widgets are arranged horizontally. 

columnLayout 
The content is divided into equally spaced columns and the widgets are arranged vertically. 
GridLayout
A basic layout divides the available space into vertical columns of equal width and arranges a list of widgets using a rowfirst strategy.
JSON representation  

{
"columns": string,
"widgets": [
{
object ( 
Fields  

columns 
The number of columns into which the view's width is divided. If omitted or set to zero, a system default will be used while rendering. 
widgets[] 
The informational elements that are arranged into the columns rowfirst. 
Widget
Widget contains a single dashboard component and configuration of how to present the component in the dashboard.
JSON representation  

{ "title": string, // Union field 
Fields  

title 
Optional. The title of the widget. 

Union field content . Content defines the component used to populate the widget. content can be only one of the following: 

xyChart 
A chart of time series data. 

scorecard 
A scorecard summarizing time series data. 

text 
A raw string or markdown displaying textual content. 

blank 
A blank space. 
XyChart
A chart that displays data on a 2D (X and Y axes) plane.
JSON representation  

{ "dataSets": [ { object ( 
Fields  

dataSets[] 
Required. The data displayed in this chart. 
timeshiftDuration 
The duration used to display a comparison chart. A comparison chart simultaneously shows values from two similarlength time periods (e.g., weekoverweek metrics). The duration must be positive, and it can only be applied to charts with data sets of LINE plot type. 
thresholds[] 
Threshold lines drawn horizontally across the chart. 
xAxis 
The properties applied to the X axis. 
yAxis 
The properties applied to the Y axis. 
chartOptions 
Display options for the chart. 
DataSet
Groups a time series query definition with charting options.
JSON representation  

{ "timeSeriesQuery": { object ( 
Fields  

timeSeriesQuery 
Required. Fields for querying time series data from the Stackdriver metrics API. 
plotType 
How this data should be plotted on the chart. 
legendTemplate 
A template string for naming 
minAlignmentPeriod 
Optional. The lower bound on data point frequency for this data set, implemented by specifying the minimum alignment period to use in a time series query For example, if the data is published once every 10 minutes, the 
TimeSeriesQuery
TimeSeriesQuery collects the set of supported methods for querying time series data from the Stackdriver metrics API.
JSON representation  

{ "unitOverride": string, // Union field 
Fields  

unitOverride 
The unit of data contained in fetched time series. If nonempty, this unit will override any unit that accompanies fetched data. The format is the same as the 

Union field source . Parameters needed to obtain data for the chart. source can be only one of the following: 

timeSeriesFilter 
Filter parameters to fetch time series. 

timeSeriesFilterRatio 
Parameters to fetch a ratio between two time series filters. 

timeSeriesQueryLanguage 
A query used to fetch time series. 
TimeSeriesFilter
A filter that defines a subset of time series data that is displayed in a widget. Time series data is fetched using the timeSeries.list
method.
JSON representation  

{ "filter": string, "aggregation": { object ( 
Fields  

filter 
Required. The monitoring filter that identifies the metric types, resources, and projects to query. 
aggregation 
By default, the raw time series data is returned. Use this field to combine multiple time series for different views of the data. 
secondaryAggregation 
Apply a second aggregation after 
pickTimeSeriesFilter 
Ranking based time series filter. 
Aggregation
Describes how to combine multiple time series to provide a different view of the data. Aggregation of time series is done in two steps. First, each time series in the set is aligned to the same time interval boundaries, then the set of time series is optionally reduced in number.
Alignment consists of applying the perSeriesAligner
operation to each time series after its data has been divided into regular alignmentPeriod
time intervals. This process takes all of the data points in an alignment period, applies a mathematical transformation such as averaging, minimum, maximum, delta, etc., and converts them into a single data point per period.
Reduction is when the aligned and transformed time series can optionally be combined, reducing the number of time series through similar mathematical transformations. Reduction involves applying a crossSeriesReducer
to all the time series, optionally sorting the time series into subsets with groupByFields
, and applying the reducer to each subset.
The raw time series data can contain a huge amount of information from multiple sources. Alignment and reduction transforms this mass of data into a more manageable and representative collection of data, for example "the 95% latency across the average of all tasks in a cluster". This representative data can be more easily graphed and comprehended, and the individual time series data is still available for later drilldown. For more details, see Filtering and aggregation.
JSON representation  

{ "alignmentPeriod": string, "perSeriesAligner": enum ( 
Fields  

alignmentPeriod 
The The value must be at least 60 seconds. If a perseries aligner other than The maximum value of the 
perSeriesAligner 
An Not all alignment operations may be applied to all time series. The valid choices depend on the Time series data must be aligned in order to perform crosstime series reduction. If 
crossSeriesReducer 
The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series. Not all reducer operations can be applied to all time series. The valid choices depend on the Time series data must first be aligned (see 
groupByFields[] 
The set of fields to preserve when 
Aligner
The Aligner
specifies the operation that will be applied to the data points in each alignment period in a time series. Except for ALIGN_NONE
, which specifies that no operation be applied, each alignment operation replaces the set of data values in each alignment period with a single value: the result of applying the operation to the data values. An aligned time series has a single data value at the end of each alignmentPeriod
.
An alignment operation can change the data type of the values, too. For example, if you apply a counting operation to boolean values, the data valueType
in the original time series is BOOLEAN
, but the valueType
in the aligned result is INT64
.
Enums  

ALIGN_NONE 
No alignment. Raw data is returned. Not valid if crossseries reduction is requested. The valueType of the result is the same as the valueType of the input. 
ALIGN_DELTA 
Align and convert to This alignment is valid for 
ALIGN_RATE 
Align and convert to a rate. The result is computed as This aligner is valid for If, by "rate", you mean "percentage change", see the 
ALIGN_INTERPOLATE 
Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The valueType of the aligned result is the same as the valueType of the input. 
ALIGN_NEXT_OLDER 
Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The valueType of the aligned result is the same as the valueType of the input. 
ALIGN_MIN 
Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The valueType of the aligned result is the same as the valueType of the input. 
ALIGN_MAX 
Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The valueType of the aligned result is the same as the valueType of the input. 
ALIGN_MEAN 
Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The valueType of the aligned result is DOUBLE . 
ALIGN_COUNT 
Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The valueType of the aligned result is INT64 . 
ALIGN_SUM 
Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The valueType of the aligned result is the same as the valueType of the input. 
ALIGN_STDDEV 
Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The valueType of the output is DOUBLE . 
ALIGN_COUNT_TRUE 
Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The valueType of the output is INT64 . 
ALIGN_COUNT_FALSE 
Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The valueType of the output is INT64 . 
ALIGN_FRACTION_TRUE 
Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range [0.0, 1.0] and has valueType DOUBLE . 
ALIGN_PERCENTILE_99 
Align the time series by using percentile aggregation. The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with valueType DOUBLE . 
ALIGN_PERCENTILE_95 
Align the time series by using percentile aggregation. The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with valueType DOUBLE . 
ALIGN_PERCENTILE_50 
Align the time series by using percentile aggregation. The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with valueType DOUBLE . 
ALIGN_PERCENTILE_05 
Align the time series by using percentile aggregation. The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with valueType DOUBLE . 
ALIGN_PERCENT_CHANGE 
Align and convert to a percentage change. This aligner is valid for If the values of A 10minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very shortlived spikes. The moving mean is only applicable for data whose values are 
Reducer
A Reducer operation describes how to aggregate data points from multiple time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.
Enums  

REDUCE_NONE 
No crosstime series reduction. The output of the Aligner is returned. 
REDUCE_MEAN 
Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The valueType of the output is DOUBLE . 
REDUCE_MIN 
Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The valueType of the output is the same as the valueType of the input. 
REDUCE_MAX 
Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The valueType of the output is the same as the valueType of the input. 
REDUCE_SUM 
Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The valueType of the output is the same as the valueType of the input. 
REDUCE_STDDEV 
Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The valueType of the output is DOUBLE . 
REDUCE_COUNT 
Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string valueType . The valueType of the output is INT64 . 
REDUCE_COUNT_TRUE 
Reduce by computing the number of True valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean valueType . The valueType of the output is INT64 . 
REDUCE_COUNT_FALSE 
Reduce by computing the number of False valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean valueType . The valueType of the output is INT64 . 
REDUCE_FRACTION_TRUE 
Reduce by computing the ratio of the number of True valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean valueType . The output value is in the range [0.0, 1.0] and has valueType DOUBLE . 
REDUCE_PERCENTILE_99 
Reduce by computing the 99th percentile of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE . 
REDUCE_PERCENTILE_95 
Reduce by computing the 95th percentile of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE . 
REDUCE_PERCENTILE_50 
Reduce by computing the 50th percentile of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE . 
REDUCE_PERCENTILE_05 
Reduce by computing the 5th percentile of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE . 
PickTimeSeriesFilter
Describes a rankingbased time series filter. Each input time series is ranked with an aligner. The filter will allow up to numTimeSeries
time series to pass through it, selecting them based on the relative ranking.
For example, if rankingMethod
is METHOD_MEAN
,direction
is BOTTOM
, and numTimeSeries
is 3, then the 3 times series with the lowest mean values will pass through the filter.
JSON representation  

{ "rankingMethod": enum ( 
Fields  

rankingMethod 

numTimeSeries 
How many time series to allow to pass through the filter. 
direction 
How to use the ranking to select time series that pass through the filter. 
Method
The value reducers that can be applied to a PickTimeSeriesFilter
.
Enums  

METHOD_UNSPECIFIED 
Not allowed. You must specify a different Method if you specify a PickTimeSeriesFilter . 
METHOD_MEAN 
Select the mean of all values. 
METHOD_MAX 
Select the maximum value. 
METHOD_MIN 
Select the minimum value. 
METHOD_SUM 
Compute the sum of all values. 
METHOD_LATEST 
Select the most recent value. 
Direction
Describes the ranking directions.
Enums  

DIRECTION_UNSPECIFIED 
Not allowed. You must specify a different Direction if you specify a PickTimeSeriesFilter . 
TOP 
Pass the highest numTimeSeries ranking inputs. 
BOTTOM 
Pass the lowest numTimeSeries ranking inputs. 
TimeSeriesFilterRatio
A pair of time series filters that define a ratio computation. The output time series is the pairwise division of each aligned element from the numerator and denominator time series.
JSON representation  

{ "numerator": { object ( 
Fields  

numerator 
The numerator of the ratio. 
denominator 
The denominator of the ratio. 
secondaryAggregation 
Apply a second aggregation after the ratio is computed. 
pickTimeSeriesFilter 
Ranking based time series filter. 
RatioPart
Describes a query to build the numerator or denominator of a TimeSeriesFilterRatio.
JSON representation  

{
"filter": string,
"aggregation": {
object ( 
Fields  

filter 
Required. The monitoring filter that identifies the metric types, resources, and projects to query. 
aggregation 
By default, the raw time series data is returned. Use this field to combine multiple time series for different views of the data. 
PlotType
The types of plotting strategies for data sets.
Enums  

PLOT_TYPE_UNSPECIFIED 
Plot type is unspecified. The view will default to LINE . 
LINE 
The data is plotted as a set of lines (one line per series). 
STACKED_AREA 
The data is plotted as a set of filled areas (one area per series), with the areas stacked vertically (the base of each area is the top of its predecessor, and the base of the first area is the X axis). Since the areas do not overlap, each is filled with a different opaque color. 
STACKED_BAR 
The data is plotted as a set of rectangular boxes (one box per series), with the boxes stacked vertically (the base of each box is the top of its predecessor, and the base of the first box is the X axis). Since the boxes do not overlap, each is filled with a different opaque color. 
HEATMAP 
The data is plotted as a heatmap. The series being plotted must have a DISTRIBUTION value type. The value of each bucket in the distribution is displayed as a color. This type is not currently available in the Stackdriver Monitoring application. 
Threshold
Defines a threshold for categorizing time series values.
JSON representation  

{ "label": string, "value": number, "color": enum ( 
Fields  

label 
A label for the threshold. 
value 
The value of the threshold. The value should be defined in the native scale of the metric. 
color 
The state color for this threshold. Color is not allowed in a XyChart. 
direction 
The direction for the current threshold. Direction is not allowed in a XyChart. 
Color
The color suggests an interpretation to the viewer when actual values cross the threshold. Comments on each color provide UX guidance on how users can be expected to interpret a given state color.
Enums  

COLOR_UNSPECIFIED 
Color is unspecified. Not allowed in wellformed requests. 
YELLOW 
Crossing the threshold is "concerning" behavior. 
RED 
Crossing the threshold is "emergency" behavior. 
Direction
Whether the threshold is considered crossed by an actual value above or below its threshold value.
Enums  

DIRECTION_UNSPECIFIED 
Not allowed in wellformed requests. 
ABOVE 
The threshold will be considered crossed if the actual value is above the threshold value. 
BELOW 
The threshold will be considered crossed if the actual value is below the threshold value. 
Axis
A chart axis.
JSON representation  

{
"label": string,
"scale": enum ( 
Fields  

label 
The label of the axis. 
scale 
The axis scale. By default, a linear scale is used. 
Scale
Types of scales used in axes.
Enums  

SCALE_UNSPECIFIED 
Scale is unspecified. The view will default to LINEAR . 
LINEAR 
Linear scale. 
LOG10 
Logarithmic scale (base 10). 
ChartOptions
Options to control visual rendering of a chart.
JSON representation  

{
"mode": enum ( 
Fields  

mode 
The chart mode. 
Mode
Chart mode options.
Enums  

MODE_UNSPECIFIED 
Mode is unspecified. The view will default to COLOR . 
COLOR 
The chart distinguishes data series using different color. Line colors may get reused when there are many lines in the chart. 
X_RAY 
The chart uses the Stackdriver xray mode, in which each data set is plotted using the same semitransparent color. 
STATS 
The chart displays statistics such as average, median, 95th percentile, and more. 
Scorecard
A widget showing the latest value of a metric, and how this value relates to one or more thresholds.
JSON representation  

{ "timeSeriesQuery": { object ( 
Fields  

timeSeriesQuery 
Required. Fields for querying time series data from the Stackdriver metrics API. 

thresholds[] 
The thresholds used to determine the state of the scorecard given the time series' current value. For an actual value x, the scorecard is in a danger state if x is less than or equal to a danger threshold that triggers below, or greater than or equal to a danger threshold that triggers above. Similarly, if x is above/below a warning threshold that triggers above/below, then the scorecard is in a warning state  unless x also puts it in a danger state. (Danger trumps warning.) As an example, consider a scorecard with the following four thresholds: { value: 90, category: 'DANGER', trigger: 'ABOVE', }, { value: 70, category: 'WARNING', trigger: 'ABOVE', }, { value: 10, category: 'DANGER', trigger: 'BELOW', }, { value: 20, category: 'WARNING', trigger: 'BELOW', } Then: values less than or equal to 10 would put the scorecard in a DANGER state, values greater than 10 but less than or equal to 20 a WARNING state, values strictly between 20 and 70 an OK state, values greater than or equal to 70 but less than 90 a WARNING state, and values greater than or equal to 90 a DANGER state. 

Union field data_view . Defines the optional additional chart shown on the scorecard. If neither is included  then a default scorecard is shown. data_view can be only one of the following: 

gaugeView 
Will cause the scorecard to show a gauge chart. 

sparkChartView 
Will cause the scorecard to show a spark chart. 
GaugeView
A gauge chart shows where the current value sits within a predefined range. The upper and lower bounds should define the possible range of values for the scorecard's query (inclusive).
JSON representation  

{ "lowerBound": number, "upperBound": number } 
Fields  

lowerBound 
The lower bound for this gauge chart. The value of the chart should always be greater than or equal to this. 
upperBound 
The upper bound for this gauge chart. The value of the chart should always be less than or equal to this. 
SparkChartView
A sparkChart is a small chart suitable for inclusion in a tablecell or inline in text. This message contains the configuration for a sparkChart to show up on a Scorecard, showing recent trends of the scorecard's timeseries.
JSON representation  

{
"sparkChartType": enum ( 
Fields  

sparkChartType 
Required. The type of sparkchart to show in this chartView. 
minAlignmentPeriod 
The lower bound on data point frequency in the chart implemented by specifying the minimum alignment period to use in a time series query. For example, if the data is published once every 10 minutes it would not make sense to fetch and align data at one minute intervals. This field is optional and exists only as a hint. 
SparkChartType
Defines the possible types of spark chart supported by the Scorecard
.
Enums  

SPARK_CHART_TYPE_UNSPECIFIED 
Not allowed in wellformed requests. 
SPARK_LINE 
The sparkline will be rendered as a small line chart. 
SPARK_BAR 
The sparkbar will be rendered as a small bar chart. 
Text
A widget that displays textual content.
JSON representation  

{
"content": string,
"format": enum ( 
Fields  

content 
The text content to be displayed. 
format 
How the text content is formatted. 
Format
The format type of the text content.
Enums  

FORMAT_UNSPECIFIED 
Format is unspecified. Defaults to MARKDOWN. 
MARKDOWN 
The text contains Markdown formatting. 
RAW 
The text contains no special formatting. 
RowLayout
A simplified layout that divides the available space into rows and arranges a set of widgets horizontally in each row.
JSON representation  

{
"rows": [
{
object ( 
Fields  

rows[] 
The rows of content to display. 
Row
Defines the layout properties and content for a row.
JSON representation  

{
"weight": string,
"widgets": [
{
object ( 
Fields  

weight 
The relative weight of this row. The row weight is used to adjust the height of rows on the screen (relative to peers). Greater the weight, greater the height of the row on the screen. If omitted, a value of 1 is used while rendering. 
widgets[] 
The display widgets arranged horizontally in this row. 
ColumnLayout
A simplified layout that divides the available space into vertical columns and arranges a set of widgets vertically in each column.
JSON representation  

{
"columns": [
{
object ( 
Fields  

columns[] 
The columns of content to display. 
Column
Defines the layout properties and content for a column.
JSON representation  

{
"weight": string,
"widgets": [
{
object ( 
Fields  

weight 
The relative weight of this column. The column weight is used to adjust the width of columns on the screen (relative to peers). Greater the weight, greater the width of the column on the screen. If omitted, a value of 1 is used while rendering. 
widgets[] 
The display widgets arranged vertically in this column. 
Methods 



Creates a new custom dashboard. 

Deletes an existing custom dashboard. 

Fetches a specific dashboard. 

Lists the existing dashboards. 

Replaces an existing custom dashboard with a new definition. 