last sync: 2025-May-02 19:26:58 UTC

Configure diagnostic settings for Storage Accounts to Event Hub

Community Policy definition

Source Repository Community-Policy GitHub
JSON Community-Policy GitHub
Deploy policy 5c4c164e-9f9f-4d69-9fe2-d5c1cd83f84d (4.0.0) to Azure
Display name Configure diagnostic settings for Storage Accounts to Event Hub
Id 5c4c164e-9f9f-4d69-9fe2-d5c1cd83f84d
Version 4.0.0
Details on versioning
Category Storage
Microsoft Learn
Description Deploys the diagnostic settings for Storage accounts to stream resource logs to an Event Hub when any storage accounts which is missing this diagnostic settings is created or updated. The policy will set the diagnostic with Transaction metric enabled. Made from the built-in policy for 'to Log Analytics workspace'.
Mode Indexed
Type Custom Community
Effect Default
DeployIfNotExists
Allowed
DeployIfNotExists, AuditIfNotExists, Disabled
RBAC role(s)
Role Name Role Id
Azure Event Hubs Data Owner f526a384-b230-433a-b45c-95f59c4a2dec
Log Analytics Contributor 92aaf0da-9dab-42b6-94a3-d43ce8d16293
Rule aliases THEN-ExistenceCondition (5)
Alias Namespace ResourceType Path PathIsDefault DefaultPath Modifiable
Microsoft.Insights/diagnosticSettings/eventHubAuthorizationRuleId microsoft.insights diagnosticSettings properties.eventHubAuthorizationRuleId True False
Microsoft.Insights/diagnosticSettings/eventHubName microsoft.insights diagnosticSettings properties.eventHubName True False
Microsoft.Insights/diagnosticSettings/metrics[*] microsoft.insights diagnosticSettings properties.metrics[*] True False
Microsoft.Insights/diagnosticSettings/metrics[*].category microsoft.insights diagnosticSettings properties.metrics[*].category True False
Microsoft.Insights/diagnosticSettings/metrics[*].enabled microsoft.insights diagnosticSettings properties.metrics[*].enabled True False
Rule resource types IF (1)
Microsoft.Storage/storageAccounts
JSON
EPAC
Deploy policy 5c4c164e-9f9f-4d69-9fe2-d5c1cd83f84d (4.0.0) to Azure