Function behavior when monitored URI does not contain wildcards

The following are the behaviors of the supported condition expression functions when the monitored URI does not contain wildcards—and thus points to one specific resource:

count

This function counts the number of distinct time-series data points that have been generated and implicitly reflects the "count" of data points collected at each data collection interval.

For example, applying the count function to the following URI results in a value of 1.

 /rest/v1/system/subsystems/chassis/base?attributes=resource_utilization.cpu
sum, min, max, and avg

Because there is just one resource, these aggregators return the current value of the resource. These aggregators only apply to resources represented by integers, such as number of packets received or CPU utilization.

Aggregator over time

When the keyword over follows one of the aggregators, the function behaves in a similar way but performs its aggregation "over" the specified time in the past instead of over the current value only.

rate

The rate function calculates the per-second average rate of increase of the monitored resource.

For example, applying the rate function to the following URI calculates the per-second average of the received packets on interface 1/1/5 for the last one minute:

/rest/v1/system/interfaces/1%2F1%2F5?attributes=statistics.rx_packets per 1 minute
transition

The transition evaluates to true if the specified resource changes state as defined.

The transition function only applies to columns of type boolean, enum, and list.

For example, the following expression is true when port 1/1/5 goes down:

transition /rest/v1/system/ports/1%2F1%2F5?attributes=admin from "up" to "down"
ratio

The ratio function calculates the ratio between numerator and denominator of the specified resource.

The ratio function only applies to columns of type integer and has the restriction that the part of URI preceding the token '?' be the same. That is, the ratio function can calculate the ratio between two attributes of the same resource, but not between attributes of different resources.

For example, to determine the ratio of the received packets to transmitted packets for interface 1/1/5, use the following expression:

ratio of /rest/v1/system/interfaces/1%2F1%2F5?attributes=statistics.rx_packets and /rest/v1/system/interfaces/1%2F1%2F5?attributes=statistics.tx_packets