Prometheus Query Functions & Operators

Prometheus Query Language supports the following aggregation functions and operators:

Aggregate functions:

  1. avg() function calculates the average value of the indicator.
  2. sum(): calculates the total of the indicator
  3. count(): calculate the number of observations for the indicator
  4. Minimum(): calculates the smallest value of the indicator
  5. max(): calculate the maximum value of the indicator
  6. Calculate the rate.
  7. calculate the increment

Operator:

  1. 在英语中表示“加法”的表示法是“+”。
  2. Subtraction
  3. exponentiation
  4. Division.
  5. == is equivalent to
  6. “!=” means “not equal to”
  7. greater than
  8. Less than
  9. ≥ : greater than or equal to
  10. <=: less than or equal to
  11. “and: logical conjunction”
  12. logical OR

These aggregation functions and operators can be used to create complex query statements for analyzing and visualizing metric data in Prometheus.

bannerAds