SignalFx Developers Guide

between()

Passes data in the input stream that’s between two specified values, or replaces data that’s not between two specified values with the value it’s closest to.

Syntax

between(low_limit, high_limit [,low_inclusive=low_include][,high_inclusive=high_include][,clamp=clamp_flag])

Table 1. Parameter definitions
Parameter Type Description

low_limit

Number

Required: The smaller specified value

high_limit

Number

Optional: The larger specified value

low_include

boolean. Default is False.

Optional: If set to True, the smaller specified value is included in the comparison

high_inclusive

boolean. Default is False.

Optional: If set to True, the larger specified value is included in the comparison

clamp

boolean. Default is False.

Indicates how the method should handle values that aren’t between low_limit and high_limit (and inclusive, if set). The following rules apply:

  • clamp=True: When a metric is not between the limits, it’s converted to the limit value it’s closer to, and passed on; otherwise the value is passed on.

  • clamp=False: When a metric is not between the limits, it’s not passed on; otherwise it’s passed on.

Returns a reference to the input stream object.

Examples

1
2
#Only publish data when cpu.utilization is between 10 and 50, and clamp out-of-range data to the closest limit
data('cpu.utilization').between(10, 50, clamp=True).publish()

© Copyright 2019 SignalFx.

Third-party license information