Processor: Range
The Range processor checks that a value is in a range. According to the specified range, it configures a check for the input series. This check returns an anomaly value if a series aggregation value, such as a last value, sum, avg etc., is in the range. This aggregation type is configured by the 'property' attribute, which is set to 'value' if not specified. The output series contains anomaly values, such as 'true' and 'false'. (Previously called 'not_in_range' and 'range_check'.) The range processor generates the output of True when the input matches the specified criteria.
Parameter | Description |
---|---|
Input Types | Table (number), Table (number, accumulate=True) |
Output Types | Table (discrete state) |
Property | A property of input items which is used to check against the range. Enum of either value, sample_count, sum, avg |
Anomalous Range (range) | Numeric range, either min or max is optional. Float type is acceptable only with property "std_dev", other property values require integers. Min and max can be expressions evaluated into numeric values. |
Graph Query (graph_query) |
One or more queries on graph specified as strings, or a list of such queries. (String will be deprecated in a future release.) Multiple queries should provide all the named nodes referenced by the expression fields (including additional_properties). Graph query is executed on the "operation" graph. Results of the queries can be accessed using the "query_result" variable with the appropriate index. For example, if querying property set nodes under name "ps", the result will be available as "query_result[0]["ps"]". In collector processors ( In other processors it is used for general parameterization and it is only supported as a list of queries. graph_query: "node("system", role="leaf", name="system"). out("hosted_interfaces"). node("interface", name="iface").out("link"). node("link", role="spine_leaf")" graph_query: ["node("system", role="leaf", name="system")", "node("system", role="spine", name="system")"] Non-collector processors containing the
graph_query: [node("property_set", label="probe_propset", name="ps")] duration: int(query_result[0]["ps"].values["accumulate_duration"]) Another example is a that probes can validate a compliance requirement; the compliance value may change over time and/or it can be used by more than one probe. Also, a probe can validate NOS versions on devices. In this case, property sets can be used to define the current NOS version requirement. If it changes tomorrow: change the property set value, instead of going under the probe stage. |
Anomaly MetricLog Retention Duration | Retain anomaly metric data in MetricDb for specified duration in seconds |
Anomaly MetricLog Retention Size | Maximum allowed size, in bytes of anomaly metric data to store in MetricDB |
Anomaly Metric Logging | Enable metric logging for anomalies |
Enable Streaming (enable_streaming) | Makes samples of output stages streamed if enabled. An optional boolean that defaults to False. If set to True, all output stages of this processor are streamed in the generic protobuf schema. |
Raise Anomaly (raise_anomaly) |
Outputs “true” and “false” values, “true” meaning an appropriate item is anomalous, and "false" meaning the item is not anomalous. When Raise Anomaly is set to True, an actual anomaly is generated in addition to a sample in the output. |
Example: Range
range: {"min": 35, "max": 45} property: "value"
Sample Input (NS)
[if_name=eth0] : 23 [if_name=eth1] : 55 [if_name=eth3] : 37
Sample Output (DSS)
[if_name=eth0] : "false" [if_name=eth1] : "false" [if_name=eth3] : "true"
If expressions are used for min or max fields of the range property, then they are evaluated for each input item which results into item-specific thresholds. Properties of the respective output item are extended by range_min or range_max properties with calculated values.
range: {"max": "speed * 0.7"} property: "value"
Sample Input (NS)
[if_name=eth0,speed=10000000000] : 800000000 [if_name=eth1,speed=1000000000] : 800000000
Sample Output (DSS)
if_name=eth0,speed=10000000000,range_max=7000000000] : "false" [if_name=eth1,speed=1000000000,range_max=700000000] : "true"