azure-infrastructure

Inspect Azure VMs, AKS clusters, Log Analytics, Monitor metrics, costs, and NSG rules.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill azure-infrastructure-erwinv2k-tkg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-infrastructure
Source: https://github.com/erwinv2k-TKG/AgentesVSC/tree/main/packs/incidentfox/sre-agent/.claude/skills/infrastructure-azure
Command: npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill azure-infrastructure-erwinv2k-tkg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires azure-identity, azure-mgmt-compute, azure-mgmt-containerservice, azure-mgmt-monitor, azure-mgmt-network, azure-mgmt-costmanagement, azure-mgmt-resourcegraph, azure-monitor-query, and includes scripts (resource) components.

What problem does it solve? Investigating Azure infrastructure issues requires switching between the Azure portal, CLI, and multiple consoles to correlate logs, metrics, alerts, and resource configurations. This Skill centralizes that investigation into scripted queries so an agent can diagnose VM performance, AKS issues, cost spikes, and network rules directly. ## Core Features & Use Cases - KQL Log & Resource Queries: Run Log Analytics KQL queries and cross-subscription Azure Resource Graph queries to find errors and inventory resources. - Metrics, Alerts & Resource Inspection: Pull Azure Monitor metrics, list alert rules, and describe VMs and AKS clusters with provisioning state and tags. - Cost & Network Analysis: Query Cost Management by resource group or service and inspect NSG security rules. - Use Case: When a VM shows high CPU, follow the built-in workflow: pull Monitor metrics, query Perf counters in Log Analytics, then describe the VM to correlate configuration with the spike. ## Quick Start Ask the agent to investigate high CPU usage on an Azure VM by querying Monitor metrics and Log Analytics, then describing the VM configuration.

Frequently Asked Questions about azure-infrastructure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Azure Log Analytics with KQL from Python?

Use the query_log_analytics.py script with a workspace ID and KQL query string, such as filtering AzureDiagnostics for errors in the last hour. It uses the azure-monitor-query LogsQueryClient and returns results as JSON tables.

How to investigate high CPU on an Azure VM?

Start with get_monitor_metrics.py to pull Percentage CPU metrics for the VM resource ID, then query Perf counters in Log Analytics for the computer, and finally run describe_vm.py to check its size, status, and configuration.

What Azure credentials does this Skill need?

Authentication uses DefaultAzureCredential, which supports Azure CLI login, managed identity, or service principal environment variables. Credentials are injected by a proxy layer, and only AZURE_SUBSCRIPTION_ID must be set as a non-secret configuration variable.

Can I query resources across multiple Azure subscriptions?

Yes, query_resource_graph.py uses Azure Resource Graph with KQL and accepts a --subscriptions argument to query multiple subscriptions. By default it queries the subscription defined in AZURE_SUBSCRIPTION_ID.

Why does the Azure script fail with a subscription error?

The scripts raise a RuntimeError when AZURE_SUBSCRIPTION_ID is not set in the environment. Verify the variable is configured, and confirm your credentials have access to that subscription through DefaultAzureCredential.