azure-diagnostics
Debug Azure production issues using AppLens, Azure Monitor, resource health, and safe triage, including evidence-only diagnosis without live access. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, 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, lock renewal during long-running processing, service bus dead letter.
- License 许可
- MIT
- 所属仓库
- microsoft/skills
- 最近更新
- 2026-11-12
- Stars
- ★ 3.2k
- Forks
- 365
01 前言 Front Matter
- name
- azure-diagnostics
- license
- MIT
- metadata
- { "author": "Microsoft", "version": "1.2.14" }
- description
- Debug Azure production issues using AppLens, Azure Monitor, resource health, and safe triage, including evidence-only diagnosis without live access. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, 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, lock renewal during long-running processing, service bus dead letter.
02 资源文件 53
- 参考文档references/app-service/README.md7.8 KB
- 参考文档references/azure-resource-graph.md2.8 KB
- 参考文档references/container-apps/README.md3.5 KB
- 参考文档references/functions/durable.md7.6 KB
- 参考文档references/functions/README.md3.9 KB
- 参考文档references/functions/triggers.md8.3 KB
- 参考文档references/kql-queries.md1.3 KB
- 脚本scripts/aks-baseline.ps17.4 KB
- 脚本scripts/aks-baseline.sh7.0 KB
- 脚本scripts/appservice-diagnostics.ps12.7 KB
- 脚本scripts/appservice-diagnostics.sh3.3 KB
- 脚本scripts/containerapp-diagnostics.ps12.5 KB
- 脚本scripts/containerapp-diagnostics.sh3.1 KB
- 脚本scripts/pod-evidence.ps16.6 KB
- 脚本scripts/pod-evidence.sh7.1 KB
- 脚本scripts/run-ig.ps15.6 KB
- 脚本scripts/run-ig.sh6.5 KB
- 脚本scripts/test-messaging-connectivity.ps16.3 KB
- 脚本scripts/test-messaging-connectivity.sh6.8 KB
- 参考文档troubleshooting/aks/aks-troubleshooting.md9.2 KB
- 参考文档troubleshooting/aks/general-diagnostics.md2.0 KB
- 参考文档troubleshooting/aks/load-balancer-and-ingress.md3.6 KB
- 参考文档troubleshooting/aks/network-policy.md832 B
- 参考文档troubleshooting/aks/networking.md5.5 KB
- 参考文档troubleshooting/aks/node-issues.md4.7 KB
- 参考文档troubleshooting/aks/optional-aks-operations.md2.3 KB
- 参考文档troubleshooting/aks/pod-failures.md7.6 KB
- 参考文档troubleshooting/aks/references/aks-mcp.md2.3 KB
- 参考文档troubleshooting/aks/references/command-flows.md4.1 KB
- 参考文档troubleshooting/aks/references/inspektor-gadget.md7.6 KB
- 参考文档troubleshooting/aks/references/structured-input-modes.md1.5 KB
- 参考文档troubleshooting/aks/spot-and-zone-issues.md2.5 KB
- 参考文档troubleshooting/aks/upgrade-operations.md2.2 KB
- 参考文档troubleshooting/compute/references/cannot-connect-to-vm.md3.1 KB
- 参考文档troubleshooting/compute/references/credential-auth-errors.md2.3 KB
- 参考文档troubleshooting/compute/references/firewall-blocking.md2.3 KB
- 参考文档troubleshooting/compute/references/network-connectivity.md2.5 KB
- 参考文档troubleshooting/compute/references/rdp-connectivity.md2.7 KB
- 参考文档troubleshooting/compute/references/rdp-service-config.md3.2 KB
- 参考文档troubleshooting/compute/references/ssh-connectivity.md2.9 KB
- 参考文档troubleshooting/compute/references/vm-agent-not-responding.md3.6 KB
- 参考文档troubleshooting/compute/vm-troubleshooting.md3.3 KB
- 参考文档troubleshooting/messaging/auth-best-practices.md6.1 KB
- 参考文档troubleshooting/messaging/azure-eventhubs-dotnet.md3.5 KB
- 参考文档troubleshooting/messaging/azure-eventhubs-java.md3.2 KB
- 参考文档troubleshooting/messaging/azure-eventhubs-js.md2.7 KB
- 参考文档troubleshooting/messaging/azure-eventhubs-py.md4.3 KB
- 参考文档troubleshooting/messaging/azure-servicebus-dotnet.md2.5 KB
- 参考文档troubleshooting/messaging/azure-servicebus-java.md2.2 KB
- 参考文档troubleshooting/messaging/azure-servicebus-js.md2.4 KB
- 参考文档troubleshooting/messaging/azure-servicebus-py.md2.3 KB
- 参考文档troubleshooting/messaging/README.md1.6 KB
- 参考文档troubleshooting/messaging/service-troubleshooting.md5.1 KB
03 SKILL.md 正文
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.
Triggers
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)
- Root-cause a symptom that looks like a healthy-runtime-but-wrong-destination problem (e.g., telemetry/messages stop flowing to the expected resource after a config change) — invoke this skill for the matrix even when MCP tools could answer the surface question alone
Rules
- Start with systematic diagnosis flow
- Use supplied evidence first. If the user requests evidence-only analysis or prohibits live Azure access, do not query or modify Azure. Diagnose from the supplied logs, metrics, and timeline; identify assumptions and provide optional verification steps.
- 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
- Prefer bundled diagnostic scripts over ad hoc calls for permitted live collection when identifiers are known. If supplied evidence suffices or live access is prohibited, don't run them; otherwise run the applicable script first.
- Route AKS incidents to the dedicated AKS troubleshooting document
- Keep baseline AKS diagnostics available even when the optional
aks-skillsadd-on is absent, declined, or unsupported by the host
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
04 同仓库更多 Skills
skill-creator
Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.
podcast-generation
Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket. Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.
microsoft-docs
Understand Microsoft technologies by querying official documentation. Use whenever the user asks how something works, wants tutorials, needs configuration options, limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365, Windows, Power Platform, etc.)—even if they don't mention "docs." If the question is about understanding a concept rather than writing code, this is the right skill.
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP), Node/TypeScript (MCP SDK), or C#/.NET (Microsoft MCP SDK).
kql
KQL language expertise for writing correct, efficient Kusto Query Language queries. Covers syntax gotchas, join patterns, dynamic types, datetime pitfalls, regex patterns, serialization, memory management, result-size discipline, and advanced functions (geo, vector, graph). USE THIS SKILL whenever writing, debugging, or reviewing KQL queries — even simple ones — because the gotchas section prevents the most common errors that waste tool calls and cause expensive retry cascades. Trigger on: KQL, Kusto, ADX, Azure Data Explorer, Fabric Real-Time Intelligence, EventHouse, Log Analytics, log analysis, data exploration, time series, anomaly detection, summarize, where clause, join, extend, project, let statement, parse operator, extract function, any mention of pipe-forward query syntax.
github-issue-creator
Convert raw notes, error logs, voice dictation, or screenshots into crisp GitHub-flavored markdown issue reports. Use when the user pastes bug info, error messages, or informal descriptions and wants a structured GitHub issue. Supports images/GIFs for visual evidence.