below()
Was this page helpful?
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
Parameter | Type | Description |
---|---|---|
limit | Number | Required: Pass through metric values that are below this limit, or change data above this limit to the limit. |
inclusive | boolean. Default is False . | Optional: Indicates if the value of limit itself is included in the filter. If False , the filter is only for values thatare strictly below the limit. |
clamp | boolean. 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 onclamp = 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()