azure-kusto
microsoft/azure-skills
Query and analyze Azure Data Explorer (Kusto/ADX) data using KQL for logs, telemetry, and time series analytics.
What is azure-kusto?
The azure-kusto skill enables coding agents to query and manage Azure Data Explorer (ADX) clusters using KQL (Kusto Query Language). It supports schema discovery, data retrieval, aggregations, time series analysis, joins, and anomaly detection across large-scale log and telemetry datasets. Includes MCP tool bindings and Azure CLI fallback commands.
- Execute KQL queries against Azure Data Explorer databases
- List ADX clusters and databases within an Azure subscription
- Retrieve table schemas to understand data structure before querying
- Perform aggregations, time series analysis, and percentile calculations
- Join multiple tables for cross-dataset correlation and root cause analysis
- Fall back to Azure CLI commands when MCP tools are unavailable
How to install azure-kusto
npx skills add https://github.com/microsoft/azure-skills --skill azure-kusto- Azure subscription with at least one Azure Data Explorer cluster
- Viewer role (minimum) on the target Kusto database
- Azure MCP server configured, or Azure CLI installed and authenticated
- Cluster name and database name for the target data source
How to use azure-kusto
- 1.Install the skill: npx skills add https://github.com/microsoft/azure-skills --skill azure-kusto
- 2.Ask the agent to list your ADX clusters (provide subscription ID or name)
- 3.Ask the agent to list databases in a specific cluster
- 4.Request table schema exploration to understand the data model
- 5.Run a KQL query by describing what data you need (time range, filters, aggregations)
- 6.Review query results including row counts and execution statistics
- 7.If MCP tools fail, the agent will automatically fall back to Azure CLI commands
- 8.Refine queries iteratively using KQL patterns like summarize, bin, join, or render
Use cases
- Analyzing application logs or error events in the last N hours
- Monitoring performance metrics and response time percentiles over time
- Exploring IoT or telemetry data aggregated by dimension or time bucket
- Correlating events across tables using CorrelationId for root cause analysis
- Discovering available tables and schemas in an unfamiliar ADX database
- Platform and SRE engineers monitoring application performance
- Data engineers working with large-scale log or telemetry pipelines
- Security analysts running SIEM or threat-hunting queries
- IoT developers querying device telemetry stored in ADX
- Developers new to KQL who need guided query patterns
azure-kusto FAQ
Basic data retrieval with filtering, aggregation with summarize and bin, time series analytics with render timechart, multi-table joins, and schema discovery.
The skill falls back to Azure CLI commands (az kusto cluster list, az kusto database list) and the Kusto REST API via az rest for query execution.
At minimum, the Viewer role on the target Kusto database is required for read-only queries. Cluster listing may require subscription-level read access.
Always include a time range filter (e.g., where Timestamp > ago(1h)), use take or limit for exploratory queries, filter on indexed columns first, and use project to select only needed columns.
The documented MCP tools and patterns focus on querying and schema exploration. No ingestion or write operations are described in the skill.
Full instructions (SKILL.md)
Source of truth, from microsoft/azure-skills.
name: azure-kusto description: "Query and analyze data in Azure Data Explorer (Kusto/ADX) using KQL for log analytics, telemetry, and time series analysis. WHEN: KQL queries, Kusto database queries, Azure Data Explorer, ADX clusters, log analytics, time series data, IoT telemetry, anomaly detection." license: MIT metadata: author: Microsoft version: "1.1.1"
Azure Data Explorer (Kusto) Query & Analytics
Execute KQL queries and manage Azure Data Explorer resources for fast, scalable big data analytics on log, telemetry, and time series data.
Skill Activation Triggers
Use this skill immediately when the user asks to:
- "Query my Kusto database for [data pattern]"
- "Show me events in the last hour from Azure Data Explorer"
- "Analyze logs in my ADX cluster"
- "Run a KQL query on [database]"
- "What tables are in my Kusto database?"
- "Show me the schema for [table]"
- "List my Azure Data Explorer clusters"
- "Aggregate telemetry data by [dimension]"
- "Create a time series chart from my logs"
Key Indicators:
- Mentions "Kusto", "Azure Data Explorer", "ADX", or "KQL"
- Log analytics or telemetry analysis requests
- Time series data exploration
- IoT data analysis queries
- SIEM or security analytics tasks
- Requests for data aggregation on large datasets
- Performance monitoring or APM queries
Overview
This skill enables querying and managing Azure Data Explorer (Kusto), a fast and highly scalable data exploration service optimized for log and telemetry data. Azure Data Explorer provides sub-second query performance on billions of records using the Kusto Query Language (KQL).
Key capabilities:
- Query Execution: Run KQL queries against massive datasets
- Schema Exploration: Discover tables, columns, and data types
- Resource Management: List clusters and databases
- Analytics: Aggregations, time series, anomaly detection, machine learning
Core Workflow
- Discover Resources: List available clusters and databases in subscription
- Explore Schema: Retrieve table structures to understand data model
- Query Data: Execute KQL queries for analysis, filtering, aggregation
- Analyze Results: Process query output for insights and reporting
Query Patterns
Pattern 1: Basic Data Retrieval
Fetch recent records from a table with simple filtering.
Example KQL:
Events
| where Timestamp > ago(1h)
| take 100
Use for: Quick data inspection, recent event retrieval
Pattern 2: Aggregation Analysis
Summarize data by dimensions for insights and reporting.
Example KQL:
Events
| summarize count() by EventType, bin(Timestamp, 1h)
| order by count_ desc
Use for: Event counting, distribution analysis, top-N queries
Pattern 3: Time Series Analytics
Analyze data over time windows for trends and patterns.
Example KQL:
Telemetry
| where Timestamp > ago(24h)
| summarize avg(ResponseTime), percentiles(ResponseTime, 50, 95, 99) by bin(Timestamp, 5m)
| render timechart
Use for: Performance monitoring, trend analysis, anomaly detection
Pattern 4: Join and Correlation
Combine multiple tables for cross-dataset analysis.
Example KQL:
Events
| where EventType == "Error"
| join kind=inner (
Logs
| where Severity == "Critical"
) on CorrelationId
| project Timestamp, EventType, LogMessage, Severity
Use for: Root cause analysis, correlated event tracking
Pattern 5: Schema Discovery
Explore table structure before querying.
Tools: kusto_table_schema_get
Use for: Understanding data model, query planning
Key Data Fields
When executing queries, common field patterns:
- Timestamp: Time of event (datetime) - use
ago(),between(),bin()for time filtering - EventType/Category: Classification field for grouping
- CorrelationId/SessionId: For tracing related events
- Severity/Level: For filtering by importance
- Dimensions: Custom properties for grouping and filtering
Result Format
Query results include:
- Columns: Field names and data types
- Rows: Data records matching query
- Statistics: Row count, execution time, resource utilization
- Visualization: Chart rendering hints (timechart, barchart, etc.)
KQL Best Practices
๐ข Performance Optimized:
- Filter early: Use
wherebefore joins and aggregations - Limit result size: Use
takeorlimitto reduce data transfer - Time filters: Always filter by time range for time series data
- Indexed columns: Filter on indexed columns first
๐ต Query Patterns:
- Use
summarizefor aggregations instead ofcount()alone - Use
bin()for time bucketing in time series - Use
projectto select only needed columns - Use
extendto add calculated fields
๐ก Common Functions:
ago(timespan): Relative time (ago(1h), ago(7d))between(start .. end): Range filteringstartswith(),contains(),matches regex: String filteringparse,extract: Extract values from stringspercentiles(),avg(),sum(),max(),min(): Aggregations
Best Practices
- Always include time range filters to optimize query performance
- Use
takeorlimitfor exploratory queries to avoid large result sets - Leverage
summarizefor aggregations instead of client-side processing - Store frequently-used queries as functions in the database
- Use materialized views for repeated aggregations
- Monitor query performance and resource consumption
- Apply data retention policies to manage storage costs
- Use streaming ingestion for real-time analytics (< 1 second latency)
- Integrate with Azure Monitor for operational insights
MCP Tools Used
| Tool | Purpose |
|---|---|
kusto_cluster_list | List all Azure Data Explorer clusters in a subscription |
kusto_database_list | List all databases in a specific Kusto cluster |
kusto_query | Execute KQL queries against a Kusto database |
kusto_table_schema_get | Retrieve schema information for a specific table |
Required Parameters:
subscription: Azure subscription ID or display namecluster: Kusto cluster name (e.g., "mycluster")database: Database namequery: KQL query string (for query operations)table: Table name (for schema operations)
Optional Parameters:
resource-group: Resource group name (for listing operations)tenant: Azure AD tenant ID
Fallback Strategy: Azure CLI Commands
If Azure MCP Kusto tools fail, timeout, or are unavailable, use Azure CLI commands as fallback.
CLI Command Reference
| Operation | Azure CLI Command |
|---|---|
| List clusters | az kusto cluster list --resource-group <rg-name> |
| List databases | az kusto database list --cluster-name <cluster> --resource-group <rg-name> |
| Show cluster | az kusto cluster show --name <cluster> --resource-group <rg-name> |
| Show database | az kusto database show --cluster-name <cluster> --database-name <db> --resource-group <rg-name> |
KQL Query via Azure CLI
For queries, use the Kusto REST API or direct cluster URL:
az rest --method post \
--url "https://<cluster>.<region>.kusto.windows.net/v1/rest/query" \
--body "{ \"db\": \"<database>\", \"csl\": \"<kql-query>\" }"
When to Fallback
Switch to Azure CLI when:
- MCP tool returns timeout error (queries > 60 seconds)
- MCP tool returns "service unavailable" or connection errors
- Authentication failures with MCP tools
- Empty response when database is known to have data
Common Issues
- Access Denied: Verify database permissions (Viewer role minimum for queries)
- Query Timeout: Optimize query with time filters, reduce result set, or increase timeout
- Syntax Error: Validate KQL syntax - common issues: missing pipes, incorrect operators
- Empty Results: Check time range filters (may be too restrictive), verify table name
- Cluster Not Found: Check cluster name format (exclude ".kusto.windows.net" suffix)
- High CPU Usage: Query too broad - add filters, reduce time range, limit aggregations
- Ingestion Lag: Streaming data may have 1-30 second delay depending on ingestion method
Use Cases
- Log Analytics: Application logs, system logs, audit logs
- IoT Analytics: Sensor data, device telemetry, real-time monitoring
- Security Analytics: SIEM data, threat detection, security event correlation
- APM: Application performance metrics, user behavior, error tracking
- Business Intelligence: Clickstream analysis, user analytics, operational KPIs
Related skills
More from microsoft/azure-skills and the wider catalog.
finetuning
Fine-tune models on Azure AI Foundry with SFT, DPO, or RFT training methods.
azure-ai
Azure AI services skill for Search, Speech, OpenAI, and Document Intelligence in coding agents
azure-deploy
Execute Azure deployments for prepared applications with built-in error recovery and validation.
azure-diagnostics
Debug Azure production issues using AppLens, Azure Monitor, resource health, and systematic triage.
azure-prepare
Generate Azure deployment infrastructure (Bicep/Terraform, azure.yaml, Dockerfiles) for new or existing apps
azure-storage
Azure Storage skill: Blob, File Shares, Queue, Table, and Data Lake with access tier guidance and lifecycle management