DevOps & Infra
azure-monitor-tools - Claude MCP Skill
Azure Monitor Tools for AKS-MCP
SEO Guide: Enhance your AI agent with the azure-monitor-tools tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to azure monitor tools for aks-mcp... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# Azure Monitor Tools for AKS-MCP
Implement Azure Monitor capabilities for AKS clusters and related Azure resources.
## Overview
This component provides Azure Monitor command-line tools for retrieving metrics, managing diagnostic settings, and monitoring Azure resources through the Azure CLI.
## Supported Commands
### Metrics Commands
#### `az_monitor_metrics_list`
**Purpose**: List the metric values for a resource
**Parameters**:
- `args` (required): Arguments for the `az monitor metrics list` command
**Example Usage**:
```bash
--resource /subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName} --metric "Percentage CPU"
```
#### `az_monitor_metrics_list-definitions`
**Purpose**: List the metric definitions for a resource
**Parameters**:
- `args` (required): Arguments for the `az monitor metrics list-definitions` command
**Example Usage**:
```bash
--resource /subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.ContainerService/managedClusters/{clusterName}
```
#### `az_monitor_metrics_list-namespaces`
**Purpose**: List the metric namespaces for a resource
**Parameters**:
- `args` (required): Arguments for the `az monitor metrics list-namespaces` command
**Example Usage**:
```bash
--resource /subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.ContainerService/managedClusters/{clusterName}
```
## Implementation Details
### File Organization
```
internal/components/monitor/
āāā registry.go # Command registration and tool definitions
āāā registry_test.go # Unit tests for the registry
```
### Tool Registration
Tools are automatically registered in the MCP server based on access level:
- **Read-only**: All metric listing commands
- **Read-write**: Currently empty (placeholder for future features)
- **Admin**: Currently empty (placeholder for future features)
### Command Structure
Each monitor command follows the `MonitorCommand` structure:
```go
type MonitorCommand struct {
Name string // Full Azure CLI command name
Description string // Human-readable description
ArgsExample string // Example arguments
Category string // Command category (e.g., "metrics")
}
```
### Integration with Server
The monitor commands are registered in `internal/server/server.go`:
```go
// Register read-only az monitor commands (available at all access levels)
for _, cmd := range monitor.GetReadOnlyMonitorCommands() {
log.Println("Registering az monitor command:", cmd.Name)
azTool := monitor.RegisterMonitorCommand(cmd)
commandExecutor := azcli.CreateCommandExecutorFunc(cmd.Name)
s.mcpServer.AddTool(azTool, tools.CreateToolHandler(commandExecutor, s.cfg))
}
```
## Access Level Requirements
### Readonly Access
- ā
`az monitor metrics list` - List metric values
- ā
`az monitor metrics list-definitions` - List metric definitions
- ā
`az monitor metrics list-namespaces` - List metric namespaces
### Readwrite Access
- Inherits all readonly commands
- š *Future: Additional monitoring configuration commands*
### Admin Access
- Inherits all readwrite commands
- š *Future: Advanced monitoring management commands*
## Common Use Cases
### AKS Cluster Monitoring
Monitor AKS cluster performance and health:
```bash
# Get cluster metrics
az monitor metrics list --resource /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.ContainerService/managedClusters/{cluster}
# List available metrics for AKS cluster
az monitor metrics list-definitions --resource /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.ContainerService/managedClusters/{cluster}
az monitor metrics list --resource /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.ContainerService/managedClusters/{cluster} --metric apiserver_cpu_usage_percentage --interval PT1M --aggregation Average --output table
```
## Error Handling
The monitor tools leverage the existing error handling infrastructure:
- Azure CLI authentication errors are handled gracefully
- Invalid resource IDs return descriptive error messages
- Network connectivity issues are properly reported
- Malformed arguments are validated before execution
## Future Enhancements
### Planned Read-Write Features
- Diagnostic settings management
- Alert rule configuration
- Action group management
- Log Analytics workspace operations
### Planned Admin Features
- Advanced monitoring configuration
- Custom metric definitions
- Cross-subscription monitoring setup
## Testing
Comprehensive unit tests cover:
- Command registration functionality
- Tool creation and validation
- Command structure validation
- Integration with MCP framework
Run tests with:
```bash
go test -v ./internal/components/monitor/...
```
## Integration Examples
### Using with Claude/AI Assistants
```
"Please show me the CPU metrics for my AKS cluster named 'prod-cluster' in resource group 'production'"
This would translate to:
az_monitor_metrics_list with args: "--resource /subscriptions/{sub}/resourceGroups/production/providers/Microsoft.ContainerService/managedClusters/prod-cluster --metric 'CPU Usage'"
```
## Dependencies
- Azure CLI (`az` command) must be installed and configured
- Valid Azure authentication (service principal or user login)
- Appropriate RBAC permissions for target resources
- Network connectivity to Azure endpointsSignals
Information
- Repository
- Azure/aks-mcp
- Author
- Azure
- Last Sync
- 3/12/2026
- Repo Updated
- 3/11/2026
- Created
- 1/16/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
upgrade-nodejs
Upgrading Bun's Self-Reported Node.js Version
cursorrules
CrewAI Development Rules
cn-check
Install and run the Continue CLI (`cn`) to execute AI agent checks on local code changes. Use when asked to "run checks", "lint with AI", "review my changes with cn", or set up Continue CI locally.
CLAUDE
CLAUDE.md
Related Guides
Bear Notes Claude Skill: Your AI-Powered Note-Taking Assistant
Learn how to use the bear-notes Claude skill. Complete guide with installation instructions and examples.
Mastering tmux with Claude: A Complete Guide to the tmux Claude Skill
Learn how to use the tmux Claude skill. Complete guide with installation instructions and examples.
OpenAI Whisper API Claude Skill: Complete Guide to AI-Powered Audio Transcription
Learn how to use the openai-whisper-api Claude skill. Complete guide with installation instructions and examples.