BM: Baca dalam Bahasa Melayu
World O2: Counters · Boss challenge
Count the orders
You will learn: to answer five real questions about Kedai Kancil with PromQL.
Checked with Prometheus 3 on 1 Nov 2026
The problem
Boss: the owner has five questions, and it is 28m. Question 1: which target is down?
Show only the targets that are down.
Predict
shop-2 is down. Who can still tell you whether customers reach the shop?
Pick one answer.
Try it
Question 2: orders per minute, one line per stall.
Use rate, sum by (stall), and turn seconds into minutes.
Check
Does it answer “orders per minute”? Swipe right for yes.
Swipe right for good, left for needs work. Or use the buttons.
rate(kedai_orders_total[5m]) * 60Try it
Question 3: what share of web requests fail with a 5xx code?
Divide the 5xx rate by the rate of all requests. One number.
Check
Next comes p95. Put the recipe in order, from the inside out.
Inside at the top. Put these in order. Use the arrows, or drag.
- kedai_checkout_duration_seconds_bucket
- histogram_quantile(0.95, … )
- sum by (le) ( … )
- rate( … [5m])
Try it
Question 4: p95 checkout time, both shops together.
Build the p95 recipe and Run.
Predict
p95 is 1.86 s. The SLO says 95% of checkouts finish under 1 s. Is it met?
Pick one answer.
Try it
Last question: how many orders came in the last 10 minutes, all stalls together?
Use increase over 10 minutes, then add everything up.
You did it!
You can now answer real questions about a shop with PromQL.
Go deeper (optional)
Real rep: ask your own kedai-watch stack the same kinds of questions.
Real mission
docker compose up -ddocker compose stop node-exporterdocker compose down
0 of 5 steps done · Your ticks are saved.
Bahasa Melayu
Boss: pemilik ada lima soalan, dan sekarang 28m. Soalan 1: target mana yang mati?
shop-2 mati. Siapa masih boleh beritahu sama ada pelanggan sampai ke kedai?
Soalan 2: pesanan seminit, satu baris untuk setiap gerai.
Adakah ia jawab “pesanan seminit”? Leret ke kanan untuk ya.
Soalan 3: berapa peratus permintaan web gagal dengan kod 5xx?
Seterusnya p95. Susun resipinya, dari dalam ke luar.
Soalan 4: masa bayaran p95, kedua-dua kedai sekali.
p95 ialah 1.86 s. SLO kata 95% bayaran siap bawah 1 s. Tercapai?
Soalan terakhir: berapa pesanan masuk dalam 10 minit lepas, semua gerai sekali?
Kini anda boleh jawab soalan sebenar tentang kedai dengan PromQL.
You finished this before. Practice is always welcome!
Official docs: Prometheus: querying basics · PromQL functions · PromQL operators
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?