Give AlbumentationsX a star on GitHub — it powers this leaderboard

Star on GitHub

azure-mgmt-monitor

Microsoft Azure Monitor Client Library for Python

Rank: #1303Downloads: 8,390,601 (30 days)Stars: 5,497Forks: 3,248

Description

Microsoft Azure SDK for Python

This is the Microsoft Azure Monitor Client Library. This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the azure sdk python release.

Disclaimer

Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691

Getting started

Prerequisites

Install the package

pip install azure-mgmt-monitor
pip install azure-identity

Authentication

By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.

  • AZURE_CLIENT_ID for Azure client ID.
  • AZURE_TENANT_ID for Azure tenant ID.
  • AZURE_CLIENT_SECRET for Azure client secret.

In addition, Azure subscription ID can be configured via environment variable AZURE_SUBSCRIPTION_ID.

With above configuration, client can be authenticated by following code:

from azure.identity import DefaultAzureCredential
from azure.mgmt.monitor import MonitorManagementClient
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = MonitorManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)

Examples

Code samples for this package can be found at:

Troubleshooting

Next steps

Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.

Release History

7.0.0 (2025-07-28)

Features Added

  • Client MonitorManagementClient added operation group action_groups
  • Client MonitorManagementClient added operation group activity_log_alerts
  • Client MonitorManagementClient added operation group activity_logs
  • Client MonitorManagementClient added operation group alert_rule_incidents
  • Client MonitorManagementClient added operation group autoscale_settings
  • Client MonitorManagementClient added operation group predictive_metric
  • Client MonitorManagementClient added operation group data_collection_endpoints
  • Client MonitorManagementClient added operation group data_collection_rule_associations
  • Client MonitorManagementClient added operation group data_collection_rules
  • Client MonitorManagementClient added operation group event_categories
  • Client MonitorManagementClient added operation group log_profiles
  • Client MonitorManagementClient added operation group metric_alerts
  • Client MonitorManagementClient added operation group metric_alerts_status
  • Client MonitorManagementClient added operation group baselines
  • Client MonitorManagementClient added operation group metric_definitions
  • Client MonitorManagementClient added operation group metric_namespaces
  • Client MonitorManagementClient added operation group metrics
  • Client MonitorManagementClient added operation group operations
  • Client MonitorManagementClient added operation group scheduled_query_rules
  • Client MonitorManagementClient added operation group tenant_activity_logs
  • Client MonitorManagementClient added operation group azure_monitor_workspaces
  • Client MonitorManagementClient added operation group monitor_operations
  • Added model ActionDetail
  • Added model ActionGroup
  • Added model ActionGroupList
  • Added model ActionGroupResource
  • Added model ActionList
  • Added enum ActionType
  • Added model Actions
  • Added model ActivityLogAlertResource
  • Added model AdxDestination
  • Added model AgentSetting
  • Added model AgentSettingsSpec
  • Added enum AggregationType
  • Added enum AggregationTypeEnum
  • Added model AlertRuleAllOfCondition
  • Added model AlertRuleAnyOfOrLeafCondition
  • Added model AlertRuleLeafCondition
  • Added model AlertRuleList
  • Added model AlertRulePatchObject
  • Added enum AlertSeverity
  • Added model ArmRoleReceiver
  • Added model AutomationRunbookReceiver
  • Added model AutoscaleErrorResponse
  • Added model AutoscaleErrorResponseError
  • Added model AutoscaleNotification
  • Added model AutoscaleProfile
  • Added model AutoscaleSettingResource
  • Added model AutoscaleSettingResourceCollection
  • Added model AutoscaleSettingResourcePatch
  • Added model AzureFunctionReceiver
  • Added model AzureMonitorMetricsDestination
  • Added model AzureMonitorWorkspace
  • Added model AzureMonitorWorkspaceDefaultIngestionSettings
  • Added model AzureMonitorWorkspaceMetrics
  • Added model AzureMonitorWorkspaceResource
  • Added model AzureMonitorWorkspaceResourceForUpdate
  • Added model AzureMonitorWorkspaceResourceListResult
  • Added model AzureMonitorWorkspaceResourceProperties
  • Added model AzureResourceAutoGenerated
  • Added model BaselineMetadata
  • Added enum BaselineSensitivity
  • Added model ColumnDefinition
  • Added enum ComparisonOperationType
  • Added model Condition
  • Added model ConditionFailingPeriods
  • Added enum ConditionOperator
  • Added model ConfigurationAccessEndpointSpec
  • Added model Context
  • Added enum CreatedByType
  • Added enum CriterionType
  • Added model DataCollectionEndpoint
  • Added model DataCollectionEndpointConfigurationAccess
  • Added model DataCollectionEndpointFailoverConfiguration
  • Added model DataCollectionEndpointLogsIngestion
  • Added model DataCollectionEndpointMetadata
  • Added model DataCollectionEndpointMetricsIngestion
  • Added model DataCollectionEndpointNetworkAcls
  • Added model DataCollectionEndpointResource
  • Added model DataCollectionEndpointResourceIdentity
  • Added model DataCollectionEndpointResourceListResult
  • Added model DataCollectionEndpointResourceProperties
  • Added model DataCollectionEndpointResourceSystemData
  • Added model DataCollectionRule
  • Added model DataCollectionRuleAgentSettings
  • Added model DataCollectionRuleAssociation
  • Added model DataCollectionRuleAssociationMetadata
  • Added model DataCollectionRuleAssociationProxyOnlyResource
  • Added model DataCollectionRuleAssociationProxyOnlyResourceListResult
  • Added model DataCollectionRuleAssociationProxyOnlyResourceProperties
  • Added model DataCollectionRuleAssociationProxyOnlyResourceSystemData
  • Added model DataCollectionRuleDataSources
  • Added model DataCollectionRuleDestinations
  • Added model DataCollectionRuleEndpoints
  • Added model DataCollectionRuleMetadata
  • Added model DataCollectionRuleReferences
  • Added model DataCollectionRuleResource
  • Added model DataCollectionRuleResourceIdentity
  • Added model DataCollectionRuleResourceListResult
  • Added model DataCollectionRuleResourceProperties
  • Added model DataCollectionRuleResourceSystemData
  • Added model DataFlow
  • Added model DataImportSources
  • Added model DataImportSourcesEventHub
  • Added model DataSourcesSpec
  • Added model DataSourcesSpecDataImports
  • Added model DestinationsSpec
  • Added model DestinationsSpecAzureMonitorMetrics
  • Added model Dimension
  • Added enum DimensionOperator
  • Added model DynamicMetricCriteria
  • Added model DynamicThresholdFailingPeriods
  • Added enum DynamicThresholdOperator
  • Added enum DynamicThresholdSensitivity
  • Added model EmailNotification
  • Added model EnableRequest
  • Added model EndpointsSpec
  • Added model EnrichmentData
  • Added model ErrorAdditionalInfo
  • Added model ErrorContract
  • Added model ErrorDetail
  • Added model ErrorDetailAdditionalInfoItem
  • Added model ErrorDetailAutoGenerated
  • Added model ErrorDetailAutoGenerated2
  • Added model ErrorResponseAutoGenerated
  • Added model ErrorResponseAutoGenerated2
  • Added model ErrorResponseAutoGenerated3
  • Added model ErrorResponseAutoGenerated4
  • Added model ErrorResponseAutoGenerated5
  • Added model ErrorResponseCommonV2
  • Added model ErrorResponseError
  • Added model ErrorResponseErrorAdditionalInfoItem
  • Added model EventCategoryCollection
  • Added model EventData
  • Added model EventDataCollection
  • Added model EventHubDataSource
  • Added model EventHubDestination
  • Added model EventHubDirectDestination
  • Added model EventHubReceiver
  • Added enum EventLevel
  • Added model ExtensionDataSource
  • Added model FailoverConfigurationSpec
  • Added model HttpRequestInfo
  • Added model Identity
  • Added enum IdentityType
  • Added model IisLogsDataSource
  • Added model Incident
  • Added model IncidentListResult
  • Added model IngestionSettings
  • Added model ItsmReceiver
  • Added enum Kind
  • Added enum KnownAgentSettingName
  • Added enum KnownColumnDefinitionType
  • Added enum KnownDataCollectionEndpointProvisioningState
  • Added enum KnownDataCollectionEndpointResourceKind
  • Added enum KnownDataCollectionRuleAssociationProvisioningState
  • Added enum KnownDataCollectionRuleProvisioningState
  • Added enum KnownDataCollectionRuleResourceKind
  • Added enum KnownDataFlowStreams
  • Added enum KnownExtensionDataSourceStreams
  • Added enum KnownLocationSpecProvisioningStatus
  • Added enum KnownLogFileTextSettingsRecordStartTimestampFormat
  • Added enum KnownLogFilesDataSourceFormat
  • Added enum KnownPerfCounterDataSourceStreams
  • Added enum `KnownPrometheusFo