Grafanaダッシュボードを構築する
サービスの健全性をひと目で可視化します。
「Grafanaダッシュボードを構築する」はCoddyKit上の無料MLOps Academyレッスンです。 これはレッスン3/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMLOps Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 MLOps Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
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. ✅
よくある質問
「Grafanaダッシュボードを構築する」レッスンは無料ですか?
はい。「Grafanaダッシュボードを構築する」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、MLOps Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 MLOps Academyコースには全4レッスンが含まれています。
「Grafanaダッシュボードを構築する」で何を学びますか?
サービスの健全性をひと目で可視化します。 ブラウザで直接実行するハンズオンコードでMLOps Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
MLOps Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのMLOps Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン3/4です。
「Grafanaダッシュボードを構築する」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このMLOps Academyレッスンでコードを書いて実行できますか?
はい。すべてのMLOps Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- 予測用の構造化ログ
- Prometheusでメトリクスを公開する
- Grafanaダッシュボードを構築する
- レイテンシーとエラーの急増を検知する