The PromQL Cheatsheet is a reference guide for PromQL, the query language used in Prometheus, an open-source monitoring and alerting tool. It provides a quick summary of the syntax and functions available in PromQL to help users write queries for analyzing and extracting metrics data from Prometheus.
Q: What is PromQL?
A: PromQL is the query language used by Prometheus, an open-source monitoring system.
Q: How do I retrieve metric values using PromQL?
A: You can retrieve metric values using the 'query' function, e.g. query(metric_name).
Q: What is a selector in PromQL?
A: A selector is used to filter metric instances based on their labels, e.g. metric_name.
Q: How do I aggregate metrics in PromQL?
A: You can aggregate metrics using functions like 'sum', 'avg', 'min', 'max', etc.
Q: Can I perform mathematical operations in PromQL?
A: Yes, PromQL supports mathematical operations like addition, subtraction, multiplication, and division.