Azure Monitor Query SDK for Python
Query logs and metrics from Azure Monitor and Log Analytics workspaces.
Installation
pip install azure-monitor-query
Environment Variables
# Log Analytics
AZURE_LOG_ANALYTICS_WORKSPACE_ID=<workspace-id>
# Metrics
AZURE_METRICS_RESOURCE_URI=/subscriptions/<sub>/resourceGroups/<rg>/providers/<provider>/<type>/<name>
Authentication
from azure.identity import DefaultAzureCredential
credential = DefaultAzureCrede
[Description truncada. Veja o README completo no GitHub.]