SignalFx Developers Guide

range_detector()

Returns a detect block that triggers when stream is outside of or within (depending on orientation) lower_threshold and upper_threshold for the duration and percentage specified in observed_lasting

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

Syntax

aperiodic.range_detector(stream, lower_threshold, upper_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

lower_threshold

Data stream or constant

Lower boundary of the range to compare to stream

upper_threshold

Data stream or constant

Upper boundary of the range to compare to stream

orientation

Enumerated string

  • 'out_of_band': Trigger on (stream < lower_threshold) OR (stream > upper_threshold)

  • 'within_range': Trigger on lower_threshold < stream < upper_threshold

observed_lasting

lasting() object

The specified stream versus lower_threshold and upper_threshold relationships 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 lower_threshold and upper_threshold relationships must last for at least the specified percentage of expected datapoints over the specified duration. SignalFx calculates the expected 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 cpu is lower than 20 or greater than 80
#for at least 90% of the received datapoints over a duration of 10 minutes
aperiodic.range_detector(cpu, 20, 80, 'out_of_band', lasting('10m', 0.9)).publish('cpu_outside_20_80')

© Copyright 2019 SignalFx.

Third-party license information