如何修改 Azure 監視器的存取權限

根據預設,建立 Grafana 實例時,它會在訂用帳戶內的所有 Azure 監視器資料和 Log Analytics 資源上授與監視讀取者角色。

這表示新的 Grafana 實例可以存取和搜尋訂用帳戶中的所有監視資料。 它可以檢視來自所有資源的 Azure 監視器計量和記錄,以及訂用帳戶中 Log Analytics 工作區中儲存的任何記錄。

在本文中,瞭解如何使用受控識別手動授與 Azure 受控 Grafana 的許可權,以存取 Azure 資源。

必要條件

登入 Azure

請使用您的 Azure 帳戶登入 Azure 入口網站 (https://portal.azure.com/)。

編輯 Azure 監視器許可權

若要編輯特定資源的許可權,請遵循下列步驟。

  1. 開啟包含您要擷取之監視資料的資源。 在此範例中,我們會設定 Application Insights 資源。

  2. 選取存取控制 (IAM)

  3. 授與此資源的存取權下方,選取新增角色指派

    Screenshot of the Azure platform to add role assignment in App Insights.

  4. 入口網站會列出您可以提供給 Azure 受控 Grafana 資源的所有角色。 選取角色。 例如, 監視讀取器 ,然後選取 [ 下一步 ]。 Screenshot of the Azure platform and choose Monitor Reader.

  5. 針對 [ 指派存取權] ,選取 [ 受控識別 ]。

  6. 按一下 [ 選取成員 ]。

    Screenshot of the Azure platform selecting members.

  7. 選取包含受控 Grafana 實例的訂 用帳戶。

  8. 針對 [受控識別 ],選取 [Azure 受控 Grafana ]。

  9. 選取一或多個受控 Grafana 實例。

  10. 按一下 [ 選取 ] 以確認

    Screenshot of the Azure platform selecting the instance.

  11. 選取 [下一步 ],然後 選取 [檢閱 + 指派 ] 以確認新許可權的指派。

如需如何使用受控 Grafana 搭配 Azure 監視器的詳細資訊,請移至 在 Grafana 中監視您的 Azure 服務。

下一步