SignalFx Developers Guide

lasting()

Use lasting() to combine the lasting argument and optionally the at_least argument to a when() function.

Syntax

`lasting(lasting=<duration>, at_least=<percentage>)

Table 1. Parameter definitions
Parameter Type Description

lasting

string

Duration that indicates how long the when() predicate must be true before it returns true. The default is "None", which specifies that when() is true as long as its predicate is met. Durations are specified as a number followed by a single character: s for seconds, m for minutes, and h for hours.

at_least

Decimal value

Indicates the percentage of lasting that the when() predicate must be true before it returns true. Allow you to specify and, or, and not logical operators.

Examples

1
2
3
4
# Specifies that the when() predicate must be true for 50% of 5 minutes
my_lasting = lasting('5m', .5)
# when the stddev of memory.utilization is greater than .2 for 50% of 5 minutes
mem_stddev = data('memory.utilization').stddev()\nwhen(mem_stddev > .2, my_lasting)

© Copyright 2019 SignalFx.

Third-party license information