Condition expression syntax

The condition of a rule is a one-line expression that uses the following syntax, expressed in EBNF (Extended Backus-Naur) notation:

uri          = ? https://tools.ietf.org/html/rfc3986 ?
enum         = ? string ?
integer      = ? signed int64 ?
list_element = '"' , ( enum | integer ) , '"'
list         = list_element , { "," , list_element }
operator     = "<" | ">" | "==" | "!=" | "<=" | ">="
over         = "over" , integer , time
for          = "for" , integer , time
time         = "second" | "seconds" | "minute" | "minutes" | "day"  
               | "days" | "hour" | "hours" | "day" | "days"
aggregator   = "count" | "sum" | "min" | "max" | "avg"
pause        = "pause" , integer , time
operation1   = uri , operator , list , [ for ] , [ pause ]
operation2   = aggregator , [ over ] , uri , operator , integer , 
               [ for ] , [ pause ]
operation3   = "rate" , uri, "per" , integer , time , operator , float , 
               [ for ] , [ pause ]
operation4   = "transition" , uri , "from" , list , "to" , list
operation5   = "ratio", "of", uri, "and", uri | integer, operator, integer, 
               [ for ] , [ pause ]
operation6   = "every", integer, time

A condition expression can be only in the format described by the operations operation1 through operation6.

In operation1, the >, < , <=, and >= operators cannot be applied if list token is of type enum.

The behaviors of the supported functions depend on whether the monitored URI contains wildcards.

If an aggregation function is used in the definition of the monitor, the equivalent aggregation function cannot be used in a condition expression for that monitor.