You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过连接字符串定位对应的Application Insights实例?

根据InstrumentationKey快速定位对应的Application Insights实例

以下是几种高效的解决方法,无需逐个查看实例:

方法1:使用Azure资源Graph查询(跨订阅批量检索)

资源Graph是Azure中跨订阅查询资源的工具,能快速定位目标实例:

  1. 在Azure Portal搜索框中输入资源Graph Explorer并打开;
  2. 在查询编辑器中输入以下Kusto查询语句,将00000000-0000-0000-0000-000000000000替换为你的InstrumentationKey:
resources
| where type == "microsoft.insights/components"
| where properties.InstrumentationKey == "00000000-0000-0000-0000-000000000000"
| project name, resourceGroup, subscriptionId, properties.InstrumentationKey, location
  1. 点击「运行查询」,结果会直接展示匹配的Application Insights实例的名称、所属资源组、订阅ID等信息,点击实例名称即可跳转到对应的资源页面。

方法2:使用Azure CLI命令行查询

如果习惯使用命令行,可通过Azure Cloud Shell执行以下操作:

  1. 打开Azure Portal右上角的Cloud Shell(>_图标),选择Bash环境;
  2. 执行以下命令,替换InstrumentationKey为你的值:
az monitor app-insights component list --query "[?instrumentationKey=='00000000-0000-0000-0000-000000000000']" --output table
  1. 命令执行后会列出所有匹配的实例信息,包含名称、资源组、订阅等关键内容。

方法3:检查权限问题

如果上述方法都没有返回结果,大概率是你没有目标实例所在订阅的读取权限:

  • 联系对应订阅的管理员,申请监控读取者或参与者权限;
  • 权限生效后,再重试上述查询方法即可看到目标实例。

内容的提问来源于stack exchange,提问作者Trey Mack

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 02:31:08