intermediate 5h

Prometheus + Grafana Stack

Instrument an app and build SLO dashboards with alerts.

0%

0 of 6 steps

What you will end up with

App exposing metrics

Live Grafana dashboards

Working alert rules

Build steps

0/6

Add a Prometheus client library to your app and expose a /metrics route. That endpoint is a vending machine of numbers, always ready when someone comes to check.

Add your app’s address to prometheus.yml under scrape_configs so Prometheus polls it on a schedule. Prometheus is the delivery driver making rounds to every vending machine.

Query things like rate(http_requests_total[5m]) to see requests per second. PromQL is just asking how fast a number has been changing over the last few minutes.

Add Prometheus as a data source in Grafana, then build panels using your PromQL queries. A dashboard is a wall of picture frames, each one showing a live query.

Pick a target, like 99% of requests under 300ms, then write an alert rule that fires when you are burning that budget too fast. The SLO is your speed limit, the alert rule is the radar gun.

Configure Alertmanager’s receivers to send to Slack, email, or PagerDuty, and route by label. Alertmanager is the mail sorter deciding which mailbox each letter belongs in.

Before you start

Metrics & PrometheusDashboardsSLIs & SLOs