【问题标题】:How to determine Application Insights instance from connection string?如何从连接字符串中确定 Application Insights 实例?
【发布时间】:2023-01-07 02:57:05
【问题描述】:

我有一个 Application Insights 连接字符串,想找到通往 Azure 门户中实例的方式,以便我可以查看使用该连接字符串运行的应用程序的日志。我们有多个 Application Insights 实例,跨多个订阅,跨几个帐户,这意味着我不能只单击每个实例并检查连接字符串是否匹配。

连接字符串看起来像InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://southcentralus.in.applicationinsights.azure.com/

有一个 URL,但该 URL 对于该地区的所有实例都是通用的。唯一独特的是 InstrumentationKey。

我尝试登录门户网站并在搜索框中输入 InstrumentationKey,但没有找到任何帐户。

我运气不好吗?

【问题讨论】:

    标签: azure azure-application-insights


    【解决方案1】:

    您可以通过资源图查询来完成,例如在 Azure CLI 中

    az graph query -q "Resources | where type =~ 'Microsoft.Insights/components' | where properties['ConnectionString'] == 'InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://southcentralus.in.applicationinsights.azure.com/' | project id, resourceGroup, name"
    

    【讨论】:

      猜你喜欢
      • 2022-07-23
      • 1970-01-01
      • 2019-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多