Prometheus Query Functions & Operators
Prometheus Query Language supports the following aggregation functions and operators:
Aggregate functions:
- avg() function calculates the average value of the indicator.
- sum(): calculates the total of the indicator
- count(): calculate the number of observations for the indicator
- Minimum(): calculates the smallest value of the indicator
- max(): calculate the maximum value of the indicator
- Calculate the rate.
- calculate the increment
Operator:
- 在英语中表示“加法”的表示法是“+”。
- Subtraction
- exponentiation
- Division.
- == is equivalent to
- “!=” means “not equal to”
- greater than
- Less than
- ≥ : greater than or equal to
- <=: less than or equal to
- “and: logical conjunction”
- logical OR
These aggregation functions and operators can be used to create complex query statements for analyzing and visualizing metric data in Prometheus.