你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

如何修改对 Azure Monitor 的访问权限

默认情况下,创建 Grafana 实例时,它附带在订阅中的所有 Azure Monitor 数据和 Log Analytics 资源上授予的“监视读取者”角色。

这意味着新的 Grafana 实例可以访问和搜索订阅中的所有监视数据。 它可以查看来自所有资源的 Azure Monitor 指标和日志,以及订阅中 Log Analytics 工作区内存储的任何日志。

本文介绍如何手动授予 Azure 托管 Grafana 使用托管标识访问 Azure 资源的权限。

先决条件

登录 Azure

使用 Azure 帐户登录到 https://portal.azure.com/ 的 Azure 门户。

编辑 Azure Monitor 权限

若要编辑特定资源的权限,请执行以下步骤。

  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. 选择“下一步”,然后选择“查看 + 分配”以确认分配新权限。

有关如何将 Managed Grafana 与 Azure Monitor 配合使用的详细信息,请转到在 Grafana 中监视 Azure 服务

后续步骤