azure-diagnostics

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Azure Diagnostics

Azure 诊断

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.
权威指南 — 强制合规
本文档是调试和排查Azure生产环境问题的官方参考资料。请按照以下说明系统性地诊断和解决常见Azure服务问题。

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
当用户有以下需求时,启用此技能:
  • 调试或排查生产环境问题
  • 诊断Azure服务中的错误
  • 分析应用日志或指标
  • 修复镜像拉取、冷启动或健康探针问题
  • 调查Azure资源故障原因
  • 查找应用错误的根本原因

Rules

规则

  1. Start with systematic diagnosis flow
  2. Use AppLens (MCP) for AI-powered diagnostics when available
  3. Check resource health before deep-diving into logs
  4. Select appropriate troubleshooting guide based on service type
  5. Document findings and attempted remediation steps

  1. 从系统性诊断流程开始
  2. 若可用,使用AppLens (MCP)进行AI驱动的诊断
  3. 在深入分析日志前先检查资源健康状态
  4. 根据服务类型选择合适的故障排除指南
  5. 记录诊断结果和已尝试的修复步骤

Quick Diagnosis Flow

快速诊断流程

  1. Identify symptoms - What's failing?
  2. Check resource health - Is Azure healthy?
  3. Review logs - What do logs show?
  4. Analyze metrics - Performance patterns?
  5. Investigate recent changes - What changed?

  1. 识别症状 - 哪些功能出现故障?
  2. 检查资源健康状态 - Azure服务是否正常?
  3. 查看日志 - 日志中显示了什么信息?
  4. 分析指标 - 性能模式是否有异常?
  5. 调查近期变更 - 最近有哪些变更操作?

Troubleshooting Guides by Service

按服务分类的故障排除指南

ServiceCommon IssuesReference
Container AppsImage pull failures, cold starts, health probes, port mismatchescontainer-apps/

服务常见问题参考链接
Container Apps镜像拉取失败、冷启动、健康探针故障、端口不匹配container-apps/

Quick Reference

快速参考

Common Diagnostic Commands

常用诊断命令

bash
undefined
bash
undefined

Check resource health

检查资源健康状态

az resource show --ids RESOURCE_ID
az resource show --ids RESOURCE_ID

View activity log

查看活动日志

az monitor activity-log list -g RG --max-events 20
az monitor activity-log list -g RG --max-events 20

Container Apps logs

Container Apps 日志

az containerapp logs show --name APP -g RG --follow
undefined
az containerapp logs show --name APP -g RG --follow
undefined

AppLens (MCP Tools)

AppLens (MCP 工具)

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
如需AI驱动的诊断,请使用:
mcp_azure_mcp_applens
  intent: "diagnose issues with <resource-name>"
  command: "diagnose"
  parameters:
    resourceId: "<resource-id>"
功能包括:
  • 自动检测问题
  • 根本原因分析
  • 修复建议

Azure Monitor (MCP Tools)

Azure Monitor (MCP 工具)

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.

如需查询日志和指标,请使用:
mcp_azure_mcp_monitor
  intent: "query logs for <resource-name>"
  command: "logs_query"
  parameters:
    workspaceId: "<workspace-id>"
    query: "<KQL-query>"
常见诊断查询请参考 kql-queries.md

Check Azure Resource Health

检查Azure资源健康状态

Using MCP

使用MCP

mcp_azure_mcp_resourcehealth
  intent: "check health status of <resource-name>"
  command: "get"
  parameters:
    resourceId: "<resource-id>"
mcp_azure_mcp_resourcehealth
  intent: "check health status of <resource-name>"
  command: "get"
  parameters:
    resourceId: "<resource-id>"

Using CLI

使用CLI

bash
undefined
bash
undefined

Check specific resource health

检查特定资源健康状态

az resource show --ids RESOURCE_ID
az resource show --ids RESOURCE_ID

Check recent activity

查看近期活动

az monitor activity-log list -g RG --max-events 20

---
az monitor activity-log list -g RG --max-events 20

---

References

参考资料

  • KQL Query Library
  • KQL 查询库