azure-monitor-datasource icon indicating copy to clipboard operation
azure-monitor-datasource copied to clipboard

Ability to write KQL queries for Application Insights

Open BharatRed opened this issue 6 years ago • 2 comments

Similar to Log Analytics we would like to write custom KQL queries for Application Insights. When Selected Application Insights as a Service in Metrics Tab we would like to see an edit text box to type KQL queries and plot the result set based At the moment it is limited to InfluxDB datasource query language.

BharatRed avatar Dec 18 '18 10:12 BharatRed

InfluxDB query language?

Have you seen this section of the documentation: https://github.com/grafana/azure-monitor-datasource#writing-analytics-queries-for-application-insights

daniellee avatar Feb 05 '19 00:02 daniellee

You could use cross workspace query feature for using KQL to query an Application Insights workspace.

  1. Pick the Azure monitor/Log analytics data source Instead of Application Insights.

  2. assuming your appInsights workspace is named "fabrikamapp", in a resource group "Fabrikam" in the "AI-Prototype" subscription.

    app("AI-Prototype/Fabrikam/fabrikamapp").requests | count

  3. If your log analytics & Application Insights are in the same workspace then:

    app("fabrikamapp")

Refer MSFT docs here: https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/cross-workspace-query#querying-across-log-analytics-workspaces-and-from-application-insights

asubmani avatar Apr 17 '19 17:04 asubmani