SignalFx Developers Guide

above_or_below_detector()

Returns a detect block that triggers when stream is above or below (depending on value of orientation) threshold for the duration and percentage specified by observed_lasting

If you specify expected_lasting, the detect block doesn’t trigger unless both observed_lasting and expected_lasting are satisfied.

Syntax

aperiodic.above_or_below_detector(stream, threshold, orientation, observed_lasting [, expected_lasting=None][, event_annotations=None])

Table 1. Parameter definitions
Parameter Type Description

stream

data stream or constant

Value or stream to monitor

threshold

data stream or constant

Value or stream to compare to stream

orientation

enumerated string

  • 'above': Trigger on stream > threshold

  • 'below': Trigger on stream < threshold

observed_lasting

lasting() object

The specified stream versus threshold relationship must last for at least the specified percentage of received, non-null datapoints over the specified duration.

expected_lasting

lasting() object

The specified stream versus threshold relationship must last for at least the specified percentage of expected datapoints over the specified duration. SignalFx calculates the resolution to determine the number of expected datapoints. Null values are included when determining if the percentage was exceeded for the duration.

event_annotations

dictionary

Specifies annotations and their associated messages

Returns a detect block

Examples

1
2
3
4
5
6
from signalfx.detectors.aperiodic import aperiodic
#Creates a stream containing the mean of datapoints
cpu = data('cpu.utilization').mean()
#Publishes a detect block when the mean is above 80 for at least 90% of the datapoints
#over a duration 10 minutes
above_or_below_detector(cpu, 80, 'above', lasting('10m', 0.9)).publish('cpu_above_80')

© Copyright 2019 SignalFx.

Third-party license information