Skip to content
Ameen Abozaid
Planned lessonMID-048-L02

PromQL essentials

  • Lesson 2 of 5
  • Mid-level
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); keep le when using histograms.
  • Metric and label names depend on the instrumentation; verify them in the running system before recording.
Draft outline details

Demonstration

text
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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.