SignalFx Developers Guide

SignalFlow Functions and Methods Index

This is an alphabetical list of SignalFlow functions and methods

Functions

SignalFlow functions perform operations on an input stream or expression and return an input stream or value.

The primary difference between functions and SignalFlow methods is syntax. Functions take input arguments and return values, while methods implicitly act on the input stream object that they’re called on.

Function example

1
2
3
idle = data('cpu.idle')
all = data('cpu.*').sum()
value = ceil(idle/all * 100)

Alphabetical list of functions

Function Returns

above_or_below_detector()

Aperiodic stream versus threshold detector

abs()

Absolute value of the input

ceil()

Ceiling of the input

const()

Stream of constant-value timeseries

count()

Counts the number of metric timeseries that are reporting data

data()

Stream from live metrics data

detect()

SignalFx detector

filter()

SignalFx filter

floor()

Floor of the input

graphite()

Stream that interprets a metric query coming from graphite

lasting()

Convenience wrapper that provides the lasting and at_least to a when() function.

log10()

Log 10 of the input

log()

Loge of the input

max()

Maximum of each metric in the input

mean()

Mean (average) of each metric in the input

median()

Median value of each metric in the input

min()

Minimum value of each stream in the input arguments

newrelic()

Interprets a stream as a metric query containing slash-separated dimensions

partition_filter()

Subsetting timeseries filter

percentile()

n-th percentile of each metric in the input

pow()

n-th power of each metric in the input

range_detector()

Aperiodic stream compared to upper and lower thresholds detector

sqrt()

Square root of each metric in the input

union()

Merged time series from the union of all the input timeseries

when()

Returns a when object for use in detect() functions

Methods

Methods use an object-oriented "dot" syntax. To call a method someMethod on an object such as an input stream, use the following syntax:

someStream.someMethod()

For example, this SignalFlow program publishes an output stream containing the ceiling of cpu.utilization:

1
2
#The ceiling of cpu.utilization
data('cpu.utilization').ceil().publish()

Alphabetical list of methods

Method Returns

above()

Only pass through input data that’s above a specified value, or force data above that value to a specified value

abs()

Calculate and return the absolute value of each metric in the stream object on which it’s called

below()

Only pass through input data that’s below a specified value, or force data below that value to a specified value

between()

Only pass through input data that’s between two specified values, or replace data that’s not between two specified values with the value it’s closest to.

bottom()

Get the bottom values in the stream

ceil()

Get the ceil values for each metric in the stream object on which it’s called

count()

The stream method for counting events in the stream

count()

Counts the number of inputs that have data

delta()

Calculates the difference between the current value and the previous value for each time interval in the input resolution of the stream object on which it’s called

dimensions()

Duplicates or renames metadata in the input stream on which it’s called

double_ewma()

Applies double exponential smoothing to the input stream during a specified time window or based on smoothing parameters

equals()

Only pass through input data that’s equal to a specified value, or replace data that’s not equal to a value with a specified value

ewma()

Calculates the exponentially-weighted moving average of the stream during a specified time duration or based on a smoothing parameter

fill()

Fills in missing values for timeseries in a stream

floor()

Calculates the floor of the MTS in the stream object on which it’s called

integrate()

Multiplies the values of each input timeseries in the stream object by the computation resolution in seconds. The stream object is the one on which the method is called.

kpss()

Calculates the Kwiatkowski–Phillips–Schmidt–Shin statistic on the specified time window of the stream object on which it’s called.

log10()

Calculates the common logarithm (log10) of the metric timeseries in the input stream on which it’s called

log()

Calculates the natural logarithm (loge) of the metric timeseries in the input stream on which it’s called

map()

Applies a lambda function to the metric timeseries stream on which it’s called

max()

Finds the maximum value of the metric timeseries in the stream object on which it’s called

mean_plus_stddev()

Calculates the mean plus n standard deviations of metric timeseries in the input stream on which it’s called

mean()

Calculates the mean of metric timeseries in the input stream on which it’s called

median()

Calculates the median of metric timeseries in the input stream on which it’s called

min()

Finds the minimum value of the metric timeseries in the input stream on which it’s called

not_between()

Only pass through data in the data stream if it isn’t between two specified values. The data stream is the object on which this method is called.

not_equals()

Only pass through data in the data stream if it isn’t equal to a specified value, or replace data that’s equal to a specified value with another value. The data stream is the object on which this method is called.

percentile()

Calculates the nth percentile of metric timeseries in the input stream on which it’s called

pow()

Raise the value of a metric timeseries in the input stream to an exponent, or raise a base to an exponent in a metric timeseries in the input stream

promote()

For the input stream object on which it’s called, promotes one or more custom properties to dimensions

publish()

Stream method for publishing the output of a detect stream. The optional label parameter is added to the events in the input stream.

publish()

Publishes the input stream on which it’s called to make it visible outside of a computation.

random()

Get random values from the input stream by count or percentage

rateofchange()

For the input stream on which it’s called, calculates the difference between the current and previous value of the metric for each time interval, then divides the result by the length in seconds of the time interval.

sample_stddev()

Calculates the sample standard deviation of metrics in the input stream on which it’s called

sample_variance()

Calculates the sample variance of metrics in the input stream on which it’s called

scale()

For the input stream on which it’s called, scale metrics by a multiplier value

size()

Counts the number of metrics in the input stream on which it’s called.

sqrt()

Calculates the square root of metrics in the input stream on which it’s called

stddev()

Calculates the standard deviation of metrics in the input stream on which it’s called

sum()

Calculates the sum of each metric timeseries in the input stream on which it’s called

timeshift()

Timeshifts each datapoint in the input stream on which it’s called, offsetting them by a specified time period.

top()

Returns one or more of the largest metrics in the input stream on which it’s called

variance()

Calculates the variance of metrics in the input stream on which it’s called

© Copyright 2019 SignalFx.

Third-party license information