$npx -y skills add microsoft/azure-skills --skill azure-diagnosticsDebug 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
| 1 | # Azure Diagnostics |
| 2 | |
| 3 | > **AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE** |
| 4 | > |
| 5 | > 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. |
| 6 | |
| 7 | ## Triggers |
| 8 | |
| 9 | Activate this skill when user wants to: |
| 10 | - Debug or troubleshoot production issues |
| 11 | - Diagnose errors in Azure services |
| 12 | - Analyze application logs or metrics |
| 13 | - Fix image pull, cold start, or health probe issues |
| 14 | - Investigate why Azure resources are failing |
| 15 | - Find root cause of application errors |
| 16 | - Troubleshoot App Service issues (high CPU, deployment failures, crashes, slow responses, TLS/custom domains) |
| 17 | - Respond to prompts like "troubleshoot app service", "app service high CPU", or "app service deployment failure" |
| 18 | - Troubleshoot Azure Function Apps (invocation failures, timeouts, binding errors) |
| 19 | - Find the App Insights or Log Analytics workspace linked to a Function App |
| 20 | - Troubleshoot AKS clusters, nodes, pods, ingress, or Kubernetes networking issues |
| 21 | - Troubleshoot Azure VM connectivity issues (RDP/SSH failures, port 3389/22 timeouts, NSG or firewall blocking, credential resets) |
| 22 | - Troubleshoot Azure Messaging SDK issues (Event Hubs, Service Bus connection failures, AMQP errors, message lock issues) |
| 23 | |
| 24 | ## Rules |
| 25 | |
| 26 | 1. Start with systematic diagnosis flow |
| 27 | 2. Use AppLens (MCP) for AI-powered diagnostics when available |
| 28 | 3. Check resource health before deep-diving into logs |
| 29 | 4. Select appropriate troubleshooting guide based on service type |
| 30 | 5. Document findings and attempted remediation steps |
| 31 | 6. Route AKS incidents to the dedicated AKS troubleshooting document |
| 32 | |
| 33 | --- |
| 34 | |
| 35 | ## Quick Diagnosis Flow |
| 36 | |
| 37 | 1. **Identify symptoms** - What's failing? |
| 38 | 2. **Check resource health** - Is Azure healthy? |
| 39 | 3. **Review logs** - What do logs show? |
| 40 | 4. **Analyze metrics** - Performance patterns? |
| 41 | 5. **Investigate recent changes** - What changed? |
| 42 | |
| 43 | --- |
| 44 | |
| 45 | ## Troubleshooting Guides by Service |
| 46 | |
| 47 | | Service | Common Issues | Reference | |
| 48 | |---------|---------------|-----------| |
| 49 | | **Container Apps** | Image pull failures, cold starts, health probes, port mismatches | [container-apps/](references/container-apps/README.md) | |
| 50 | | **App Service** | High CPU, deployment failures, crashes, slow responses, TLS/custom domains | [app-service/](references/app-service/README.md) | |
| 51 | | **Function Apps** | App details, invocation failures, timeouts, binding errors, cold starts, missing app settings | [functions/](references/functions/README.md) | |
| 52 | | **AKS** | Cluster access, nodes, `kube-system`, scheduling, crash loops, ingress, DNS, upgrades | [AKS Troubleshooting](troubleshooting/aks/aks-troubleshooting.md) | |
| 53 | | **Compute** | VM RDP/SSH connectivity, NSG/firewall blocks, credential resets, VM agent/tooling issues | [VM Connectivity Troubleshooting](troubleshooting/compute/vm-troubleshooting.md) | |
| 54 | | **Messaging** | Event Hubs & Service Bus SDK errors, AMQP failures, message lock, connectivity | [Messaging Troubleshooting](troubleshooting/messaging/README.md) | |
| 55 | |
| 56 | --- |
| 57 | |
| 58 | ## Routing |
| 59 | |
| 60 | - Keep Container Apps and Function Apps diagnostics in this parent skill. |
| 61 | - Route active AKS incidents, AKS-specific intake, evidence gathering, and remediation guidance to [AKS Troubleshooting](troubleshooting/aks/aks-troubleshooting.md). |
| 62 | - Route Azure VM RDP/SSH connectivity, NSG/firewall, credential reset, and VM agent troubleshooting to [VM Connectivity Troubleshooting](troubleshooting/compute/vm-troubleshooting.md). |
| 63 | - Route Azure Messaging SDK troubleshooting (Event Hubs, Service Bus) to [Messaging Troubleshooting](troubleshooting/messaging/README.md). |
| 64 | |
| 65 | --- |
| 66 | |
| 67 | ## Quick Reference |
| 68 | |
| 69 | ### Common Diagnostic Commands |
| 70 | |
| 71 | ```bash |
| 72 | # Check resource health |
| 73 | az resource show --ids RESOURCE_ID |
| 74 | # View activity log |
| 75 | az monitor activity-log list -g RG --max-events 20 |
| 76 | # Container Apps logs |
| 77 | az containerapp logs show --name APP -g RG --follow |
| 78 | # Function App logs (query App Insights traces) |
| 79 | az monitor app-insights query --apps APP-INSIGHTS -g RG \ |
| 80 | --analytics-query "traces | where timestamp > ago(1h) | order by timestamp desc | take 50" |
| 81 | ``` |
| 82 | |
| 83 | ### AppLens (MCP Tools) |
| 84 | |
| 85 | For AI-power |