Azure Diagnostics
AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE
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.
When to invoke
Activate this skill when user wants to:
- Debug or troubleshoot production issues
- Diagnose errors in Azure services
- Analyze application logs or metrics
- Fix image pull, cold start, or health probe issues
- Investigate why Azure resources are failing
- Find root cause of application errors
- Troubleshoot App Service issues (high CPU, deployment failures, crashes, slow responses, TLS/custom domains)
- Respond to prompts like "troubleshoot app service", "app service high CPU", or "app service deployment failure"
- Troubleshoot Azure Function Apps (invocation failures, timeouts, binding errors)
- Find the App Insights or Log Analytics workspace linked to a Function App
- Troubleshoot AKS clusters, nodes, pods, ingress, or Kubernetes networking issues
- Troubleshoot Azure VM connectivity issues (RDP/SSH failures, port 3389/22 timeouts, NSG or firewall blocking, credential resets)
- Troubleshoot Azure Messaging SDK issues (Event Hubs, Service Bus connection failures, AMQP errors, message lock issues)
Rules
- Start with systematic diagnosis flow
- Use AppLens (MCP) for AI-powered diagnostics when available
- Check resource health before deep-diving into logs
- Select appropriate troubleshooting guide based on service type
- Document findings and attempted remediation steps
- Route AKS incidents to the dedicated AKS troubleshooting document
Quick Diagnosis Flow
- Identify symptoms - What's failing?
- Check resource health - Is Azure healthy?
- Review logs - What do logs show?
- Analyze metrics - Performance patterns?
- Investigate recent changes - What changed?
Troubleshooting Guides by Service
| Service |
Common Issues |
Reference |
| Container Apps |
Image pull failures, cold starts, health probes, port mismatches |
container-apps/ |
| App Service |
High CPU, deployment failures, crashes, slow responses, TLS/custom domains |
app-service/ |
| Function Apps |
App details, invocation failures, timeouts, binding errors, cold starts, missing app settings |
functions/ |
| AKS |
Cluster access, nodes, kube-system, scheduling, crash loops, ingress, DNS, upgrades |
AKS Troubleshooting |
| Compute |
VM RDP/SSH connectivity, NSG/firewall blocks, credential resets, VM agent/tooling issues |
VM Connectivity Troubleshooting |
| Messaging |
Event Hubs & Service Bus SDK errors, AMQP failures, message lock, connectivity |
Messaging Troubleshooting |
Routing
- Keep Container Apps and Function Apps diagnostics in this parent skill.
- Route active AKS incidents, AKS-specific intake, evidence gathering, and remediation guidance to AKS Troubleshooting.
- Route Azure VM RDP/SSH connectivity, NSG/firewall, credential reset, and VM agent troubleshooting to VM Connectivity Troubleshooting.
- Route Azure Messaging SDK troubleshooting (Event Hubs, Service Bus) to Messaging Troubleshooting.
Quick Reference
Common Diagnostic Commands
# Check resource health
az resource show --ids RESOURCE_ID
# View activity log
az monitor activity-log list -g RG --max-events 20
# Container Apps logs
az containerapp logs show --name APP -g RG --follow
# Function App logs (query App Insights traces)
az monitor app-insights query --apps APP-INSIGHTS -g RG \
--analytics-query "traces | where timestamp > ago(1h) | order by timestamp desc | take 50"
AppLens (MCP Tools)
For AI-powered diagnostics, use:
mcp_azure_mcp_applens
intent: "diagnose issues with <resource-name>"
command: "diagnose"
parameters:
resourceId: "<resource-id>"
Provides:
- Automated issue detection
- Root cause analysis
- Remediation recommendations
Azure Monitor (MCP Tools)
For querying logs and metrics:
mcp_azure_mcp_monitor
intent: "query logs for <resource-name>"
command: "logs_query"
parameters:
workspaceId: "<workspace-id>"
query: "<KQL-query>"
See kql-queries.md for common diagnostic queries.
Check Azure Resource Health
Using MCP
mcp_azure_mcp_resourcehealth
intent: "check health status of <resource-name>"
command: "get"
parameters:
resourceId: "<resource-id>"
Using CLI
# Check specific resource health
az resource show --ids RESOURCE_ID
# Check recent activity
az monitor activity-log list -g RG --max-events 20
References
- KQL Query Library
- Azure Resource Graph Queries
- App Service Troubleshooting
- Function Apps Troubleshooting
- VM Connectivity Troubleshooting
- Messaging Troubleshooting
Output template
## Diagnostic result
**Status:** root-cause-found | mitigated | inconclusive
**Summary:** <one sentence covering scope and outcome>
### Details
Symptom, evidence gathered, root cause, and the fix or next probe.
### Validation
- <check performed>: <result and evidence>
Quality gate
1---2name: azure-diagnostics-33description: Debug Azure production issues with AppLens, Azure Monitor, resource health, and safe triage across App Service, Container Apps, Functions, AKS, virtual machines, and messaging. Use when the user needs to troubleshoot production incidents, high CPU or deployment failures, VM connectivity such as RDP, SSH, or blocked NSG rules, AKS problems such as pod pending, crashloop, node not ready, or image pull failures, cold starts, failing health probes, resource health, or Event Hubs and Service Bus SDK, AMQP, lock, and dead-letter errors.4license: MIT5---67<!-- Generated from harness/github-copilot/plugins/azure-observability-operations/skills/azure-diagnostics/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->89# Azure Diagnostics1011> **AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE**12>13> 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.1415## When to invoke1617Activate this skill when user wants to:18- Debug or troubleshoot production issues19- Diagnose errors in Azure services20- Analyze application logs or metrics21- Fix image pull, cold start, or health probe issues22- Investigate why Azure resources are failing23- Find root cause of application errors24- Troubleshoot App Service issues (high CPU, deployment failures, crashes, slow responses, TLS/custom domains)25- Respond to prompts like "troubleshoot app service", "app service high CPU", or "app service deployment failure"26- Troubleshoot Azure Function Apps (invocation failures, timeouts, binding errors)27- Find the App Insights or Log Analytics workspace linked to a Function App28- Troubleshoot AKS clusters, nodes, pods, ingress, or Kubernetes networking issues29- Troubleshoot Azure VM connectivity issues (RDP/SSH failures, port 3389/22 timeouts, NSG or firewall blocking, credential resets)30- 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| **Compute** | VM RDP/SSH connectivity, NSG/firewall blocks, credential resets, VM agent/tooling issues | [VM Connectivity Troubleshooting](troubleshooting/compute/vm-troubleshooting.md) |62| **Messaging** | Event Hubs & Service Bus SDK errors, AMQP failures, message lock, connectivity | [Messaging Troubleshooting](troubleshooting/messaging/README.md) |6364---6566## Routing6768- Keep Container Apps and Function Apps diagnostics in this parent skill.69- Route active AKS incidents, AKS-specific intake, evidence gathering, and remediation guidance to [AKS Troubleshooting](troubleshooting/aks/aks-troubleshooting.md).70- Route Azure VM RDP/SSH connectivity, NSG/firewall, credential reset, and VM agent troubleshooting to [VM Connectivity Troubleshooting](troubleshooting/compute/vm-troubleshooting.md).71- Route Azure Messaging SDK troubleshooting (Event Hubs, Service Bus) to [Messaging Troubleshooting](troubleshooting/messaging/README.md).7273---7475## Quick Reference7677### Common Diagnostic Commands7879```bash80# Check resource health81az resource show --ids RESOURCE_ID82# View activity log83az monitor activity-log list -g RG --max-events 2084# Container Apps logs85az containerapp logs show --name APP -g RG --follow86# Function App logs (query App Insights traces)87az monitor app-insights query --apps APP-INSIGHTS -g RG \88 --analytics-query "traces | where timestamp > ago(1h) | order by timestamp desc | take 50"89```9091### AppLens (MCP Tools)9293For AI-powered diagnostics, use:94```95mcp_azure_mcp_applens96 intent: "diagnose issues with <resource-name>"97 command: "diagnose"98 parameters:99 resourceId: "<resource-id>"100101Provides:102- Automated issue detection103- Root cause analysis104- Remediation recommendations105```106107### Azure Monitor (MCP Tools)108109For querying logs and metrics:110```111mcp_azure_mcp_monitor112 intent: "query logs for <resource-name>"113 command: "logs_query"114 parameters:115 workspaceId: "<workspace-id>"116 query: "<KQL-query>"117```118119See [kql-queries.md](references/kql-queries.md) for common diagnostic queries.120121---122123## Check Azure Resource Health124125### Using MCP126127```128mcp_azure_mcp_resourcehealth129 intent: "check health status of <resource-name>"130 command: "get"131 parameters:132 resourceId: "<resource-id>"133```134135### Using CLI136137```bash138# Check specific resource health139az resource show --ids RESOURCE_ID140141# Check recent activity142az monitor activity-log list -g RG --max-events 20143```144145---146147## References148149- [KQL Query Library](references/kql-queries.md)150- [Azure Resource Graph Queries](references/azure-resource-graph.md)151- [App Service Troubleshooting](references/app-service/README.md)152- [Function Apps Troubleshooting](references/functions/README.md)153- [VM Connectivity Troubleshooting](troubleshooting/compute/vm-troubleshooting.md)154- [Messaging Troubleshooting](troubleshooting/messaging/README.md)155156## Output template157158```markdown159## Diagnostic result160161**Status:** root-cause-found | mitigated | inconclusive162**Summary:** <one sentence covering scope and outcome>163164### Details165Symptom, evidence gathered, root cause, and the fix or next probe.166167### Validation168- <check performed>: <result and evidence>169```170171## Quality gate172173- [ ] Every conclusion is backed by a log, metric, or resource-health signal.174- [ ] No mutating action was taken without explicit user approval.175- [ ] The output follows `## Output template` exactly.176- [ ] Every reported check was performed and its evidence is shown.177- [ ] Irreversible Azure actions were confirmed with the user first.