Prometheus Binary Operators
While PromQL does not have traditional binary operators, it supports a range of functions and operators for manipulating and aggregating data. Here are some key operators in PromQL:
- Arithmetic Operators:
- Addition: +
- Subtraction: -
- Multiplication: *
- Division: /
- Modulo: %
- Comparison Operators:
- Equal to: ==
- Not equal to: !=
- Greater than: >
- Less than: <
- Greater than or equal to: >=
- Less than or equal to: <=
- Logical Operators:
- AND: and
- OR: or
- NOT: unless or not
- Set Operators:
- Union: |
- Intersection: &
- Difference: \
These operators can be used to construct queries in PromQL to filter, aggregate, and perform calculations on the time-series data stored in Prometheus. It's worth noting that PromQL is specifically designed for working with time-series data, and its operators and functions are optimized for that purpose.