π‘οΈ Azure Diagnostic Setting captures Administrative, Alert, Policy, and Security categoriesπ’
- Contextual name: π‘οΈ Diagnostic Setting captures Administrative, Alert, Policy, and Security categoriesπ’
- ID:
/ce/ca/azure/monitor/diagnostic-setting-categories - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY,RELIABILITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- Internal:
dec-x-a193b20f
Similar Internal Rulesβ
| Rule | Policies | Flags |
|---|---|---|
| βοΈ dec-x-a193b20f | 1 |
Descriptionβ
Descriptionβ
Prerequisite: A Diagnostic Setting must exist. If one does not exist, the navigation and options within this recommendation are not available. Review the recommendation at the beginning of this subsection titled: "Ensure that a 'Diagnostic Setting' exists."
The diagnostic setting should be configured to log the appropriate activities from the control/management plane.
Rationaleβ
A diagnostic setting controls how the diagnostic log is exported. Capturing the diagnostic setting categories for appropriate control/management plane activities allows proper alerting.
Auditβ
This policy flags an Azure Subscription Diagnostic Setting as
INCOMPLIANTif theLogs JSONdoes not capture one of the following categories: Administrative, Alert, Policy, Security.Default Valueβ
When the diagnostic setting is created using Azure Portal, by default no categories are selected.
Referencesβ
- https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings
- https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/resource-manager-diagnostic-settings
... see more
Remediationβ
Remediationβ
From Azure Portalβ
- Go to
Azure Monitor.- Click
Activity log.- Click on
Export Activity Logs.- Select the
Subscriptionfrom the drop down menu.- Click
Edit settingnext to a diagnostic setting.- Check the following categories:
Administrative,Alert,Policy, andSecurity.- Choose the destination details according to your organization's needs.
- Click
Save.From Azure CLIβ
az monitor diagnostic-settings subscription create \
--subscription {{subscription-id}} \
--name {{diagnostic-setting-name}} \
--location {{location}} \
--event-hub {{event-hub-id}} \
--event-hub-auth-rule {{event-hub-auth-rule-id}} \
--storage-account {{storage-account-id}} \
--workspace {{log-analytics-workspace-id}} \
--logs "[{category:Security,enabled:true},{category:Administrative,enabled:true},{category:Alert,enabled:true},{category:Policy,enabled:true}]"From PowerShellβ
$logCategories = @()
$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Administrative -Enabled $true
... [see more](remediation.md)