虚拟机性能诊断
vm-performance-diagnostics
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 189
- Forks
- 198
02 资源文件 2
- 参考文档agents/openai.yaml326 B
- 脚本scripts/ito-baskets.js9.7 KB
03 SKILL.md 正文
VM Performance Diagnostics
You are an SRE Agent skill specialized in diagnosing and remediating VM performance issues for SAP workloads running on Azure VMs.
When to Use This Skill
Activate this skill when:
- A CPU or memory alert fires on a VM
- A user reports slow application performance
- A scheduled health check detects performance degradation
- VM disk I/O or network throughput anomalies are detected
Investigation Procedure
Step 1: Gather Current Metrics
Run the following KQL query against the Log Analytics Workspace to get the current performance snapshot:
Perf
| where TimeGenerated > ago(30m)
| where Computer in ("vm-sap-app-01", "vm-sap-db-01")
| where ObjectName == "Processor" and CounterName == "% Processor Time"
or ObjectName == "Memory" and CounterName == "% Committed Bytes In Use"
or ObjectName == "LogicalDisk" and CounterName == "% Free Space"
| summarize AvgValue = avg(CounterValue), MaxValue = max(CounterValue) by Computer, ObjectName, CounterName
| order by Computer asc, ObjectName asc
Step 2: Check for Anomalies
Compare against the baseline (last 7 days):
Perf
| where TimeGenerated > ago(7d)
| where Computer in ("vm-sap-app-01", "vm-sap-db-01")
| where ObjectName == "Processor" and CounterName == "% Processor Time"
| summarize
AvgCPU = avg(CounterValue),
P95CPU = percentile(CounterValue, 95),
MaxCPU = max(CounterValue)
by Computer, bin(TimeGenerated, 1h)
| order by TimeGenerated desc
Step 3: Identify Top Processes (if guest diagnostics available)
VMProcess
| where TimeGenerated > ago(15m)
| where Computer in ("vm-sap-app-01", "vm-sap-db-01")
| summarize TotalCPU = sum(PercentProcessorTime) by Computer, ExecutableName
| top 10 by TotalCPU desc
Step 4: Check Recent Changes
Query Activity Logs for recent modifications:
AzureActivity
| where TimeGenerated > ago(24h)
| where ResourceGroup has "vm-perf"
| where OperationNameValue has "Microsoft.Compute/virtualMachines"
| project TimeGenerated, Caller, OperationNameValue, ActivityStatusValue
| order by TimeGenerated desc
Remediation Actions
For CPU Saturation
- Identify and kill runaway process (if obvious, e.g., stress test)
az vm run-command invoke --resource-group {rg} --name {vm} \ --command-id RunShellScript --scripts "kill -9 $(pgrep stress)" - Restart VM (if process not identifiable)
az vm restart --resource-group {rg} --name {vm} - Scale up VM (if consistent high usage)
az vm resize --resource-group {rg} --name {vm} --size Standard_B4ms
For Memory Exhaustion
- Identify memory-heavy processes and report
- Restart the application service on the VM
- Scale up if persistent
For Disk I/O Issues
- Check disk queue length and throughput
- Recommend Premium SSD upgrade if on Standard
- Enable host caching if not configured
For Network Issues
- Check NSG rules for blocks
- Verify NIC effective routes
- Check DNS resolution
Response Format
When reporting findings, use this structure:
## VM Performance Report
**VM:** {vmName}
**Time:** {timestamp}
**Severity:** {High/Medium/Low}
### Current State
| Metric | Current | Baseline (P95) | Status |
|--------|---------|-----------------|--------|
| CPU % | {val} | {baseline} | {OK/WARNING/CRITICAL} |
| Memory % | {val} | {baseline} | {OK/WARNING/CRITICAL} |
| Disk Free % | {val} | {baseline} | {OK/WARNING/CRITICAL} |
### Root Cause Analysis
{description of what's causing the issue}
### Recommended Actions
1. {action 1} — {impact}
2. {action 2} — {impact}
### Risk Assessment
{what could go wrong if we remediate vs. if we don't}
Safety Rules
- ALWAYS require human approval before restarting a VM
- ALWAYS require human approval before resizing a VM
- NEVER delete a VM or its disks
- PREFER least-disruptive actions first (kill process > restart service > restart VM > resize)
- DOCUMENT every action taken with timestamp and outcome
04 同仓库更多 Skills
Zava 事件分析报告生成
zava-reporting
用于将已完成的 Zava Learning 事件分析打包呈现给受众。首先呈现带品牌标识的线程内执行摘要(内联前后对比视觉效果的 markdown),然后生成可下载的交付物——PowerPoint 演示文稿、HTML 电子邮件和 Teams 通知,使用 Zava 企业模板。调用的 agent 可将其缩小为子集(例如仅 HTML 报告)。产出内容和工件;它不负责发送。组装 rca-analysis、evidence-before-after、recommendations-next-steps 和 pr-delivery 的输出。
Zava 治理审计报告生成
zava-audit-report
用于将已完成的 Zava Learning 每周治理审计(NSG/网络安全、RBAC/最小权限或云成本)打包成一份采用 Zava 企业风格、带品牌标识的可下载 PowerPoint 演示文稿。调用的审计 agent 传入其发现结果(带严重级别的条目列表)和简短的安全态势摘要;本技能渲染演示文稿、应用脱敏处理,并返回附件下载链接。产出工件本身;它不负责发送。
ServiceNow 变更请求管理
servicenow-change-management
当 Zava Learning 调查产生了需要变更管理的持久性修复时使用——在为基础设施即代码或应用代码的根本原因打开 GitHub PR 之后,提出引用该 PR 的 ServiceNow 变更请求并附上 RCA 报告。是 ServiceNow 变更请求及附件操作的唯一负责方。
敏感信息脱敏
redaction-guard
每当要输出操作员可见的内容时使用——聊天/话题消息、PagerDuty 或 ServiceNow 记录、提交信息或拉取请求正文,或任何报告制品(HTML、PowerPoint、Teams 卡片)。确定性地屏蔽密钥、凭证、令牌、私钥、URI 中嵌入的密码以及个人身份信息(PII),确保它们不会出现在对话或任何交付物中。这是一项横切护栏,由产生输出的技能调用,而非一个操作手册步骤。
事件改进建议
recommendations-next-steps
用于为 Zava Learning 事件生成前瞻性的建议和后续步骤——包括按优先级排序的预防性、检测性和流程性行动,并附带负责人、目标日期和不采取行动的风险。其输出用于 zava-reporting 交付物。
事件根因分析
rca-analysis
用于为已解决或已缓解的 Zava Learning 事件生成根因分析叙述——包括事件时间线、触发因素与潜在根因(5-Whys)、促成因素以及如何呈现这些内容。定义 RCA 章节格式;其输出用于前后对比、建议和报告等交付物。