Azure Monitor Query Py

Azure Monitor Query SDK for Python. Use for querying Log Analytics workspaces and Azure Monitor metrics.

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add lucaspmarie-a11y/claude-skills-vault --skill azure-monitor-query-py
Manual install
git clone --depth 1 https://github.com/lucaspmarie-a11y/claude-skills-vault.git /tmp/claude-skills-vault
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills-vault/plugins/antigravity-awesome-skills-claude/skills/azure-monitor-query-py ~/.claude/skills/azure-monitor-query-py

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Azure Monitor Query SDK for Python

Query logs and metrics from Azure Monitor and Log Analytics workspaces.

## Installation

```bash
pip install azure-monitor-query
```

## Environment Variables

```bash
# Log Analytics
AZURE_LOG_ANALYTICS_WORKSPACE_ID=<workspace-id>

# Metrics
AZURE_METRICS_RESOURCE_URI=/subscriptions/<sub>/resourceGroups/<rg>/providers/<provider>/<type>/<name>
```

## Authentication

```python
from azure.identity import DefaultAzureCredential

credential = DefaultAzureCredential()
```

## Logs Query Client

### Basic Query

```python
from azure.monitor.query import LogsQueryClient
from datetime import timedelta

client = LogsQueryClient(credential)

query = """
AppRequests
| where TimeGenerated > ago(1h)
| summarize count() by bin(TimeGenerated, 5m), ResultCode
| order by TimeGenerated desc
"""

response = client.query_workspace(
    workspace_id=os.environ["AZURE_LOG_ANALYTICS_WORKSPACE_ID"],
    query=query,
    timespan=timedelta(hours=1)
)

for table in response.tables:
    for row in table.rows:
        print(row)
```

### Query with Time Range

```python
from datetime import datetime, timezone

response = client.query_workspace(
    workspace_id=workspace_id,
    query="AppRequests | take 10",
    timespan=(
        datetime(2024, 1, 1, tzinfo=timezone.utc),
        datetime(2024, 1, 2, tzinfo=timezone.utc)
    )
)
```

### Convert to DataFrame
Read the full skill on GitHub

Details

Skill name
azure-monitor-query-py
Path
plugins/antigravity-awesome-skills-claude/skills/azure-monitor-query-py/SKILL.md
License
MIT
Repo updated
6 June 2026

FAQ

What does the Azure Monitor Query Py skill do?

Azure Monitor Query SDK for Python. Use for querying Log Analytics workspaces and Azure Monitor metrics.

How do I install the Azure Monitor Query Py skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add lucaspmarie-a11y/claude-skills-vault --skill azure-monitor-query-py. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Azure Monitor Query Py popular?

It lives in lucaspmarie-a11y/claude-skills-vault, which has 5 GitHub stars and 0 forks.

Related skills

Browse the most popular Claude skills, all devops & cloud skills, or write your own with the skills generator.