SignalFx Developers Guide

threshold()

  1. Enables the display of one or more detector trigger values in the detector UI detail view

  2. Returns the result of expression as a number that you can use in another SignalFlow function such as a term in a when() function predicate.

Syntax

threshold(expression)

Table 1. Parameter definitions
Parameter Type Description

expression

Number or expression that evaluates to a number

In most cases, use a constant or expression that represents a detector trigger value.

Use threshold() to enable the display of detector trigger values in a detector’s detail view in the UI. When you select Show threshold in the UI, the trigger values appear as horizontal lines.

threshold() also returns the result of expression, so you can use it in another SignalFlow function such as a term in a when() function predicate.

Examples

1
2
3
4
#Display a red threshold line in the detector detail view
#when demo.trans.count is between 200 and 500
A = data("demo.trans.count").publish(label="A")
B = detect((when(A > threshold(200)) and A < threshold(500))).publish("B")

© Copyright 2020 Splunk, Inc.

Third-party license information