last sync: 2023-Jun-19 17:45:01 UTC

Community Policy definition

Configure Azure Activity logs to stream to specified Event Hub

Name Configure Azure Activity logs to stream to specified Event Hub
Community-Policy GitHub
Id 42d90820-8dd4-487c-9e5b-68b288155250
Version 1.0.0
details on versioning
Category Monitoring
Microsoft docs
Description Deploys the diagnostic settings for Azure Activity to stream subscriptions audit logs to an Event Hub to monitor subscription-level events. Amended built-in policy to add eventHubName-parameter to stream to a specific event hub.
Mode All
Type Custom Community
Effect Default
DeployIfNotExists
Allowed
DeployIfNotExists, AuditIfNotExists, Disabled
Used RBAC Role
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 (3)
Alias Namespace ResourceType DefaultPath Modifiable
Microsoft.Insights/diagnosticSettings/eventHubAuthorizationRuleId microsoft.insights diagnosticSettings properties.eventHubAuthorizationRuleId false
Microsoft.Insights/diagnosticSettings/eventHubName microsoft.insights diagnosticSettings properties.eventHubName false
Microsoft.Insights/diagnosticSettings/logs.enabled microsoft.insights diagnosticSettings properties.logs[*].enabled false
Rule ResourceTypes IF (1)
Microsoft.Resources/subscriptions
THEN-Deployment (1)
Microsoft.Insights/diagnosticSettings
JSON