9/26
Sign inSign up free

1430. A p95 Panel for Every Service

medium 20 XP ~12 minHands-on lab

The team behind a small online shop wants a new panel on its dashboard: how slow each service is for the slowest of its normal requests.

The shop's five services (frontend, cart, checkout, payments, inventory) record how long every request takes in a histogram called http_server_request_duration_seconds, labelled with service and route.

ToolHoldsAddress on this machine
Grafanadashboards and Explore for the three belowhttp://127.0.0.1:3000
Prometheusmetrics and alert ruleshttp://127.0.0.1:9090
Lokilogshttp://127.0.0.1:3100
Tempotraceshttp://127.0.0.1:3200

Open Grafana and Prometheus with the buttons above the terminal.

Task

Write the PromQL query for the panel to /home/student/p95.promql (the query only, on one line or several).

It must return the 95th percentile response time, in seconds, over the last 5 minutes:

  • exactly one series per service, five in all,
  • each labelled only with service (no route, instance, job or le).

About this machine

Ubuntu 24.04 with no internet access, running the real Prometheus, Loki, Tempo and Grafana (unmodified) and a simulated shop that reports to them. Once the machine is running, Grafana and Prometheus open in a new tab from the buttons above the terminal. The history goes back about an hour. curl, jq and promtool are installed. The grader checks your answer, not the commands you typed. BrokenCluster is not affiliated with, endorsed or sponsored by Grafana Labs or the Prometheus project.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.