.conf25 registration is now open!Register today

 below()

On this page

Passes data from the input stream to the output stream that’s below a specified value, or changes data below a specified value to that value.

 Syntax

below(limit [,inclusive=include_flag][,clamp=clamp_flag])

 Parameter definitions

ParameterTypeDescription
limitNumberRequired: Pass through metric values that are below this limit, or change data above this limit to the limit.
inclusiveboolean. Default is False.Optional: Indicates if the value of limit itself is included in the filter. If False, the filter is only for values that
are strictly below the limit.
clampboolean. Default is False.Optional: Indicates how the method should handle values that are below limit. The following rules apply:
clamp = True: When a metric is above limit, it’s passed on as limit; otherwise it’s not passed on
clamp = False: When a metric is above limit, it’s not passed on; otherwise it’s passed on.

Returns a reference to the input stream object.

 Examples

#Only publish data when cpu.utilization is below 70
data('cpu.utilization').below(70).publish()

#Clamp cpu.utilization over 5 to 5
data('cpu.utilization').below(5, clamp=True).publish()