Grafana 是一個開源的分析與視覺化平台,讓你能夠查詢、監控並建立互動式儀表板,涵蓋來自多個資料來源的指標、日誌和追蹤資料。 本文說明 Azure 提供使用 Grafana 來視覺化 Azure Monitor 資料的不同選項。
Azure 提供以下兩種使用 Grafana 的選項。 文章其餘部分詳細描述每種選項,並提供應使用情境的指引。
Azure Monitor dashboards with Grafana. 在 Azure 入口網站中直接提供用于 Azure Monitor 收集資料的 Grafana 儀表板,無需費用且無需設定要求。 Azure Managed Grafana. 完全受控的 Grafana 服務,支援使用多種資料來源的儀表板。
具有 Grafana 的 Azure 監視器儀表板
具有 Grafana 的 Azure 監視器儀表板會直接在 Azure 入口網站中提供 Grafana 儀表板。 它會自動免費提供,且不需要任何設定需求。
Azure Monitor dashboards with Grafana 可啟用以下功能:
- 使用一組預先建置的儀表板來視覺化 Azure 資源的監控資料。
- 匯入數千個公開可用的 Grafana 社群儀表板 以獲取支援資源。
- 在 Azure 入口網站中建立您自己的儀表板,並套用 Grafana 各種視覺化及用戶端轉換至 Azure 監控資料。
- 管理 Grafana 儀表板作為原生 Azure 資源,包括使用 Azure RBAC 及透過 ARM 範本和 Bicep 範本自動化。
如何存取
在 Azure 入口網站中進入 Azure Monitor ,然後選擇 Dashboards with Grafana ,以取得從 Kubernetes 叢集擷取或匯入 Azure Monitor 的 Prometheus 指標。
數據源
Azure Monitor dashboards with Grafana 支援以下資料來源。 如果你需要其他資料來源,請參考 Azure Managed Grafana。
- Azure 資源中數值時間序列資料的 Azure 監視器計量。
- 適用於 Prometheus 的 Azure 監視器受管理服務適用於從 Kubernetes 叢集抓取的 Prometheus 計量。
- 適用於 Azure 資源的記錄和效能資料的 Azure 監視器記錄,可讓您使用功能強大的 Kusto 查詢語言 (KQL) 進行查詢。
- Azure Monitor Traces 可用於查詢和可視化來自 Application Insights 的分散式追蹤資料。
- Azure Resource Graph 可跨訂用帳戶快速查詢和識別 Azure 資源。
- Azure Data Explorer 可直接使用 Kusto 查詢語言(KQL)從你的 ADX 叢集查詢資料。
局限性
使用 Grafana 的 Azure Monitor 儀表板不支援以下 Grafana 功能。 如果你需要這些功能,請參考 Azure Managed Grafana。
- 警示
- 報告
- 圖書館座談
- Snapshots
- 播放列表
- 應用程式外掛
Azure 受控 Grafana
Azure Managed Grafana 是一個完全受控的 Grafana 服務,支援使用多種資料來源的儀表板。 透過與其他 Grafana 部署相同的瀏覽器體驗,存取 Grafana 儀表板。
附贈的 Azure Monitor 資料來源外掛 能讓你存取 與 Grafana 的 Azure Monitor 儀表板相同的資料來源。 新增 Prometheus 外掛程式,以便查詢和視覺化來自 Azure Monitor 的 Prometheus 管理服務的數據。 請參閱 將 Grafana 連接到 Azure Monitor 的 Prometheus 指標。
受控 Grafana 相關內容
請參閱 Azure Managed Grafana 總覽 以了解該服務的完整細節。 下表提供相關文章連結,說明如何將 Azure Managed Grafana 與 Azure Monitor 資料結合使用。
解決方案比較
由於 Azure Monitor 儀表板與 Grafana 在 Azure 入口網站中免費且無需設定,如果你只想使用 Azure Monitor 資料,Grafana 應該是你的首選。
若您需要以下任一功能,請選擇 Azure Managed Grafana :
- 存取外部資料來源與自動化,包括開源技術及 Grafana 企業資料來源。
- Grafana 警報
- 預定報告
- 能夠共享儀表板存取權,但不分享底層資料儲存的存取權
下表提供了兩種解的完整比較。
| 特徵 / 功能 | Azure 監視器 使用 Grafana 的儀表板 |
Azure 受控 Grafana |
|---|---|---|
| 存取 | Azure 入口網站 | Grafana Web 介面 |
| 定價 | 無成本 | 每個使用者定價 加上標準 SKU 的計算成本 |
| 數據源 | Azure 監視器 Azure Managed Prometheus Azure Resource Graph |
Azure 監視器、Azure Prometheus、Azure 數據總管、 OSS 數據源、 企業數據源 可供授權使用 |
| 數據源驗證 | 僅限現有使用者 | 使用者可配置:目前使用者、管理身份、應用程式註冊 |
| 數據源管理 | N/A – 取決於使用者 RBAC 角色 | 使用者管理的數據源 |
| 計算資源 | SaaS | 專用虛擬機器擴展集 |
| Grafana 企業 | 不支援 | 可搭配授權使用 |
| 其他外掛程式 | 僅由 Azure 管理 | 企業級可享 Azure 受控、開放原始碼、並可選用第三方 |
| Grafana 警示 | 不支援 | 支援 |
| Grafana 電子郵件通知 | 不支援 | 支援 |
| 報告 | 不支援 | 支援 |
| 私人網路 | 不支援 | 私人連結和受控私人端點 |
| 確定性輸出 IP | 不支援 | 支援 |
| 區域備援 | 默認為啟用 | 支援 |