SignalFx Developers Guide

data()

Creates a stream of metric time series based on the input parameters.

Syntax

data(<metric_name>, filter=<filter>, rollup=<rollup_spec>, extrapolation=<extrapolation_spec>, maxExtrapolations=<value>)

Table 1. Parameter definitions
Parameter Type Description

metric

string

Name of a metric, or a wildcard that matches one or more metrics. The * character matches multiple characters.

filter

A filter object (see filter()) or a function that returns a filter object.

Filters the metrics by a dimension name and value

rollup

string

The rollup type applied to the metric. Specify "None" to use the default rollup for the metric. You can also specify a value listed in the Rollup type table.

extrapolation

string

Specifies how to extrapolate missing data. Use one of the following options: * "null": Default Don’t supply missing data * "zero": Substitute the value 0 for missing data * "last_value": Use the last none-missing data value

maxExtrapolations

number

Specifies how many extrapolations to do after data stops arriving from a source. The value -1 specifies infinite extrapolation.

Table 2. Rollup types
Type Description

"average"

Average over the rollup duration (default for gauges)

"count"

Count of points over the rollup duration

"delta"

Change in value from the previous rollup. Useful for cumulative counters.

"latest"

Latest value received. Useful for gauges.

"max"

Max value in the rollup duration. Useful for cumulative counters.

"min"

Minimum value in the rollup duration. Useful for gauges.

"rate"

Speed that points arrive. Default for cumulative and distributed counters

"sum"

Sum over the rollup. Useful for distributed counters

"lag"

The lag in ingesting the timeseries for each timeslice

Returns a stream object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Fetch all MTS with a metrics of 'cpu.idle'
data('cpu.idle')

# Fetch all MTS with a metric that begin with 'cpu.'
data('cpu.*')

# Apply a filter to the metric query
data('cpu.idle', filter('env', 'QA'))
data('cpu.idle', filter('env', 'QA') and filter('service', 'web'))

# A filter for multiple possible values
data('cpu.idle', filter('service', 'web', 'db'))

© Copyright 2019 SignalFx.

Third-party license information