Budowanie panelu Grafana
Szybko sprawdzaj stan usługi dzięki wizualizacji
Budowanie panelu Grafana to bezpłatna lekcja MLOps Academy na CoddyKit. To lekcja 3 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej MLOps Academy, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs MLOps Academy zawiera 4 lekcji w sumie.
Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.
From Numbers to Pictures
Prometheus stores your metrics, but raw numbers are hard to read. Grafana turns them into charts you can actually understand at a glance. 📊
Grafana Plus Prometheus
Grafana does not store data itself. It queries a data source like Prometheus and draws whatever that source returns.
Add the Data Source
First step in Grafana is connecting Prometheus as a data source. You give it the Prometheus server URL and test the connection.
# Grafana > Connections > Data sources
# URL: http://prometheus:9090Dashboards and Panels
A dashboard is a screen of panels. Each panel is one chart driven by one query, so you compose a full view from small pieces.
Query with PromQL
Panels ask Prometheus questions in PromQL, its query language. This is where you turn stored metrics into a meaningful line.
Chart the Request Rate
The rate function shows per-second change of a counter over a window. It is the classic way to plot traffic to your model.
rate(predictions_total[5m])Chart the Error Ratio
Divide error rate by total rate to plot an error ratio. A rising line here means more requests are failing.
rate(errors_total[5m]) / rate(predictions_total[5m])Chart p99 Latency
From your latency histogram, compute the 99th percentile so you see the slow tail, not just the average.
histogram_quantile(0.99, rate(predict_seconds_bucket[5m]))Use Big Stat Panels
For single numbers like current error rate, a stat panel shows one large value and can flash red past a threshold. ⚠️
Variables Make It Reusable
Add a dashboard variable for model version, then one dashboard works for every model instead of copying it per version.
rate(predictions_total{model="$model"}[5m])Save It as Code
Every dashboard can be exported to JSON. Commit that file to Git so your dashboards are versioned and reproducible like the rest of your stack.
Quick Check
You want a Grafana panel showing per-second request traffic to your model from a counter. Which PromQL fits?
Recap
You connected Grafana to Prometheus, built panels with PromQL for rate, errors, and p99 latency, and saved the dashboard as JSON in Git. ✅
Często zadawane pytania
Czy lekcja „Budowanie panelu Grafana” jest bezpłatna?
Tak — pełny tekst „Budowanie panelu Grafana” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu MLOps Academy, przejdź na CoddyKit PRO. Kurs MLOps Academy zawiera 4 lekcji w sumie.
Co nauczysz się w „Budowanie panelu Grafana”?
Szybko sprawdzaj stan usługi dzięki wizualizacji Ćwiczysz MLOps Academy z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.
Czy potrzebuję doświadczenia, aby zacząć MLOps Academy?
Nie wymagamy żadnego doświadczenia. MLOps Academy w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 3 z 4.
Ile czasu zajmuje lekcja „Budowanie panelu Grafana”?
Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.
Czy mogę pisać i uruchamiać kod w tej lekcji MLOps Academy?
Tak. Każda lekcja MLOps Academy zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.
Wszystkie lekcje w tym kursie
- Logi strukturalne dla predykcji
- Udostępnianie metryk za pomocą Prometheus
- Budowanie panelu Grafana
- Alarmy dotyczące skoków opóźnień i błędów