AGENT SKILL

vm-performance-diagnostics

暂无简介

License 许可
MIT
最近更新
2026-11-10
Stars
★ 187
Forks
192

02 资源文件 2

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

  1. 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)"
    
  2. Restart VM (if process not identifiable)
    az vm restart --resource-group {rg} --name {vm}
    
  3. Scale up VM (if consistent high usage)
    az vm resize --resource-group {rg} --name {vm} --size Standard_B4ms
    

For Memory Exhaustion

  1. Identify memory-heavy processes and report
  2. Restart the application service on the VM
  3. Scale up if persistent

For Disk I/O Issues

  1. Check disk queue length and throughput
  2. Recommend Premium SSD upgrade if on Standard
  3. Enable host caching if not configured

For Network Issues

  1. Check NSG rules for blocks
  2. Verify NIC effective routes
  3. 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

microsoft
microsoft/sre-agent

zava-reporting

Use to package a completed Zava Learning incident analysis for the audience. First present a branded in-thread executive summary (markdown with the before/after visuals inline), then produce the downloadable deliverables — a PowerPoint deck, an HTML email, and a Teams notification — using the Zava corporate template. The calling agent may narrow this to a subset (e.g. only the HTML report). Produces content and artifacts; it does not send them. Assembles the output of rca-analysis, evidence-before-after, recommendations-next-steps, and pr-delivery.

★ 187
microsoft
microsoft/sre-agent

zava-audit-report

Use to package a completed Zava Learning weekly governance audit (NSG / network security, RBAC / least-privilege, or cloud cost) into a single branded, downloadable PowerPoint deck in the Zava house style. The calling audit agent passes its findings (a list of rows with severity) and a short posture summary; this skill renders the deck, applies redaction, and returns the attachment download link. Produces the artifact; it does not send it.

行政与办公人员演示文稿Skill与智能体开发
★ 187
microsoft
microsoft/sre-agent

servicenow-change-management

Use whenever a Zava Learning investigation produces a durable fix that needs change management — after a GitHub PR is opened for an Infrastructure-as-Code or application code root cause, raise a ServiceNow Change Request referencing the PR and attach the RCA report. The single owner of ServiceNow Change Request and attachment operations.

★ 187
microsoft
microsoft/sre-agent

redaction-guard

Use whenever you are about to emit operator-visible content — a chat/thread message, a PagerDuty or ServiceNow note, a commit message or pull-request body, or any report artifact (HTML, PowerPoint, Teams card). Deterministically masks secrets, credentials, tokens, private keys, URI-embedded passwords, and PII so they never appear in the thread or in any deliverable. This is a cross-cutting guardrail invoked by the output-producing skills, not a runbook step.

★ 187
microsoft
microsoft/sre-agent

recommendations-next-steps

Use to produce the forward-looking recommendations and next steps for a Zava Learning incident — prioritized preventive, detective, and process actions with owners, target dates, and the risk of inaction. Its output is used in the zava-reporting deliverables.

★ 187
microsoft
microsoft/sre-agent

rca-analysis

Use to produce the root-cause analysis narrative for a resolved or mitigated Zava Learning incident — the incident timeline, the trigger vs. latent root cause (5-Whys), contributing factors, and how to present them. Defines the RCA section format; its output is used in the before/after, recommendations, and reporting deliverables.

★ 187