AzureRecipes

Kusto Query Language (KQL) snippets

General resources:

Contents

Service(s) Architecture Problem / Solution Related Link
API Management - List all failed request details for analytics - ApiManagementFailedRequestDetails
Application Insights - List all custom metrics for analytics. See here for how to generate custom metrics in functions - ApplicationInsightsCustomMetrics
Application Insights - Get Function execution details (including duration) for analytics - ApplicationInsightsFunctionExecutions
Application Insights - Get Function requests for analytics - ApplicationInsightsFunctionRequests
Application Insights - A more general variant of ApplicationInsightsFunctionRequests which includes details to all app services conntected to an application insights resource - ApplicationInsightsAppServiceExecutions
Application Insights - Get exception details of connected App Service instances for analytics - ApplicationInsightsAppServiceExceptions
Application Insights - Calculates failure rate (in percent) for requests of connected App Services (incl. Function Apps) and API Management instances, grouped by service and with occured error codes - ApplicationInsightsRequestsFailurePercentage
Application Insights Bot Framework Analyse conversations per day based on standard Bot Framework telemetry data - ApplicationInsightsBotTelemetryConversationsPerDay
Data Factory - Get Pipeline execution details (including duration) for analytics - DataFactoryPipelineExecutions
Resource Group - List all deployments in a particular resource group. Important: To have this data available, you need to connect Azure Activity Log to the according Log Analytics Workspace. activity-log-link-log-analytics-workspace DeploymentsInResourceGroup
Resource Group - List all manual resource manipulations not orginated by a regular deployment. This may be used for definition of alerts or general analytics. Important: To have this data available, you need to connect Azure Activity Log to the according Log Analytics Workspace. activity-log-link-log-analytics-workspace ManualActivitiesInResourceGroup
(any) - Get data, such as custom metric events, from previous workday (usable for e.g. alert definitions if there is no activity required on weekends). It is not bulletproof as it does not include holidays. - CustomMetricsFromPreviousWorkday
Resource Graph - List all Subcriptions including their parent Management Groups (path) in the Portal (Explorer), CLI or REST API - ResourceGraphSubscriptionsWithManagementGroupHierarchy
Resource Graph - List all Advisor recommendations for resources and resource containers in the Portal (Explorer), CLI or REST API - AdvisorRecommendationsPerResourceWithFullHierarchy
Resource Graph - List all Defender recommendations for resources and resource containers in the Portal (Explorer), CLI or REST API. Note: It is now possible to link a Log Analytics Workspace on Subscription level (feature Continuous Export). This may be more appropriate for usage in e.g. alert rule defintions. - DefenderRecommendationsPerResourceWithFullHierarchy
Resource Graph - List all Defender scores in the Portal (Explorer), CLI or REST API. Note: It is now possible to link a Log Analytics Workspace on Subscription level (feature Continuous Export). This may be more appropriate for usage in e.g. alert rule defintions. - DefenderScoresPerSubscriptionWithFullHierarchy