Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Debug and troubleshoot Azure Container Apps and Function Apps using logs, KQL, and health checks.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: azure-diagnostics3description: "Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, troubleshoot functions, troubleshoot AKS, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, service bus dead letter."4license: MIT5metadata:6author: Microsoft7version: "1.1.4"8---910# Azure Diagnostics1112> **AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE**13>14> This document is the **official source** for debugging and troubleshooting Azure production issues. Follow these instructions to diagnose and resolve common Azure service problems systematically.1516## Triggers1718Activate this skill when user wants to:19- Debug or troubleshoot production issues20- Diagnose errors in Azure services21- Analyze application logs or metrics22- Fix image pull, cold start, or health probe issues23- Investigate why Azure resources are failing24- Find root cause of application errors25- Troubleshoot App Service issues (high CPU, deployment failures, crashes, slow responses, TLS/custom domains)26- Respond to prompts like "troubleshoot app service", "app service high CPU", or "app service deployment failure"27- Troubleshoot Azure Function Apps (invocation failures, timeouts, binding errors)28- Find the App Insights or Log Analytics workspace linked to a Function App29- Troubleshoot AKS clusters, nodes, pods, ingress, or Kubernetes networking issues30- Troubleshoot Azure Messaging SDK issues (Event Hubs, Service Bus connection failures, AMQP errors, message lock issues)3132## Rules33341. Start with systematic diagnosis flow352. Use AppLens (MCP) for AI-powered diagnostics when available363. Check resource health before deep-diving into logs374. Select appropriate troubleshooting guide based on service type385. Document findings and attempted remediation steps396. Route AKS incidents to the dedicated AKS troubleshooting document4041---4243## Quick Diagnosis Flow44451. **Identify symptoms** - What's failing?462. **Check resource health** - Is Azure healthy?473. **Review logs** - What do logs show?484. **Analyze metrics** - Performance patterns?495. **Investigate recent changes** - What changed?5051---5253## Troubleshooting Guides by Service5455| Service | Common Issues | Reference |56|---------|---------------|-----------|57| **Container Apps** | Image pull failures, cold starts, health probes, port mismatches | [container-apps/](references/container-apps/README.md) |58| **App Service** | High CPU, deployment failures, crashes, slow responses, TLS/custom domains | [app-service/](references/app-service/README.md) |59| **Function Apps** | App details, invocation failures, timeouts, binding errors, cold starts, missing app settings | [functions/](references/functions/README.md) |60| **AKS** | Cluster access, nodes, `kube-system`, scheduling, crash loops, ingress, DNS, upgrades | [AKS Troubleshooting](troubleshooting/aks/aks-troubleshooting.md) |61| **Messaging** | Event Hubs & Service Bus SDK errors, AMQP failures, message lock, connectivity | [Messaging Troubleshooting](troubleshooting/messaging/README.md) |6263---6465## Routing6667- Keep Container Apps and Function Apps diagnostics in this parent skill.68- Route active AKS incidents, AKS-specific intake, evidence gathering, and remediation guidance to [AKS Troubleshooting](troubleshooting/aks/aks-troubleshooting.md).69- Route Azure Messaging SDK troubleshooting (Event Hubs, Service Bus) to [Messaging Troubleshooting](troubleshooting/messaging/README.md).7071---7273## Quick Reference7475### Common Diagnostic Commands7677```bash78# Check resource health79az resource show --ids RESOURCE_ID80# View activity log81az monitor activity-log list -g RG --max-events 2082# Container Apps logs83az containerapp logs show --name APP -g RG --follow84# Function App logs (query App Insights traces)85az monitor app-insights query --apps APP-INSIGHTS -g RG \86--analytics-query "traces | where timestamp > ago(1h) | order by timestamp desc | take 50"87```8889### AppLens (MCP Tools)9091For AI-powered diagnostics, use:92```93mcp_azure_mcp_applens94intent: "diagnose issues with <resource-name>"95command: "diagnose"96parameters:97resourceId: "<resource-id>"9899Provides:100- Automated issue detection101- Root cause analysis102- Remediation recommendations103```104105### Azure Monitor (MCP Tools)106107For querying logs and metrics:108```109mcp_azure_mcp_monitor110intent: "query logs for <resource-name>"111command: "logs_query"112parameters:113workspaceId: "<workspace-id>"114query: "<KQL-query>"115```116117See [kql-queries.md](references/kql-queries.md) for common diagnostic queries.118119---120121## Check Azure Resource Health122123### Using MCP124125```126mcp_azure_mcp_resourcehealth127intent: "check health status of <resource-name>"128command: "get"129parameters:130resourceId: "<resource-id>"131```132133### Using CLI134135```bash136# Check specific resource health137az resource show --ids RESOURCE_ID138139# Check recent activity140az monitor activity-log list -g RG --max-events 20141```142143---144145## References146147- [KQL Query Library](references/kql-queries.md)148- [Azure Resource Graph Queries](references/azure-resource-graph.md)149- [App Service Troubleshooting](references/app-service/README.md)150- [Function Apps Troubleshooting](references/functions/README.md)151- [Messaging Troubleshooting](troubleshooting/messaging/README.md)152