PromQL essentials
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
write the queries dashboards and alerts need.
Planned topics
- Rate:
rate(metric[5m])is per-second increase. - Ratio: errors divided by total, both as rates, giving an error percentage.
- Percentile:
histogram_quantile(0.95, sum by (le) (rate(..._bucket[5m]))). - Aggregate with
sum by (label); keeplewhen using histograms. - Metric and label names depend on the instrumentation; verify them in the running system before recording.
Draft outline details
Demonstration
sum(rate(http_server_requests_seconds_count{status=~"5.."}[5m]))
/ sum(rate(http_server_requests_seconds_count[5m]))Check your understanding
Why keep le in the histogram aggregation?
Show answer
histogram_quantile needs the bucket boundaries.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.