Agent skill · software engineering · aiskillstore

azure-monitor-ingestion-py

Azure Monitor Ingestion SDK for Python. Use for sending custom logs to Log Analytics workspace via Logs Ingestion API.

Why this skill is useful

Provides specific commands and patterns for using Azure Monitor's Logs Ingestion API that the AI wouldn't reliably generate on its own.

What it needs

Requires azure-identity, azure-monitor-ingestion installed locally. Requires azure account access. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Azure Monitor Ingestion SDK for Python Send custom logs to Azure Monitor Log Analytics workspace using the Logs Ingestion API. Installation Environment Variables Prerequisites Before using this SDK, you need: 1. Log Analytics Workspace — Target for your logs 2. Data Collection Endpoint (DCE) — Ingestion endpoint 3. Data Collection Rule (DCR) — Defines schema and destination 4. Custom Table — In Log Analytics (created via DCR or manually) Authentication Upload Custom Logs Upload from JSON File Custom Error Handling Handle partial failures with a callback: Ignore Errors Async Client Sovereign Clouds Batching Behavior The SDK automatically: Splits logs into chunks of 1MB or less Compresses each chunk with gzip Uploads chunks in parallel No manual batching needed for large log sets. Client Types Client Purpose -------- --------- LogsIngestionClient Sync client for uploading logs LogsIngestionClient (aio) Async client for uploading logs Key Concepts Concept Description --------- ------------- DCE Data Collection Endpoint — ingestion URL DCR Data Collection Rule — defines schema, transformations, destination Stream Named data flow within a DCR Custom Table Target table in Log Analytics (ends with CL) DCR Stream Name Format Stream names follow patterns: Custom-<TableName>CL — For custom tables Microsoft-<TableName> — For built-in tables Best Practices 1. Use DefaultAzureCredential for authentication 2. Handle errors gracefully — use onerror callback for partial failures 3. Include TimeGenerated — Required field for all logs 4. Match DCR schema — Log fields must match DCR column definitions 5. Use async client for high-throughput scenarios 6. Batch uploads — SDK handles batching, but send reasonable chunks 7. Monitor ingestion — Check Log Analytics for ingestion status 8. Use context manager — Ensures proper client cleanup When to Use This skill is applicable to execute the workflow or actions described in the overview. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/azure-monitor-ingestion-py

View the source on GitHub

Browse the @skills marketplace