π Azure Diagnostic Setting exists for Subscription Activity Logs π’
- Contextual name: π Diagnostic Setting exists for Subscription Activity Logs π’
- ID:
/ce/ca/azure/monitor/diagnostic-setting-for-subscription-activity-logs
- Located in: π Azure Monitor
Flagsβ
- π’ Impossible policy
- π’ Policy with categories
- π’ Policy with type
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Descriptionβ
Descriptionβ
Enable Diagnostic settings for exporting activity logs. Diagnostic settings are available for each individual resource within a subscription. Settings should be configured for all appropriate resources for your environment.
Rationaleβ
A diagnostic setting controls how a diagnostic log is exported. By default, logs are retained only for 90 days. Diagnostic settings should be defined so that logs can be exported and stored for a longer duration in order to analyze security activities within an Azure subscription.
Auditβ
From Azure Portalβ
To identify Diagnostic Settings on a subscription:
- Go to
Monitor
.- Click
Activity Log
.- Click
Export Activity Logs
.- Select a
Subscription
.- Ensure a
Diagnostic settings
exists for the selected Subscription.To identify Diagnostic Settings on specific resources:
- Go to
Monitor
.- Click
Diagnostic settings
.- Ensure that Diagnostics status is
enabled
on all appropriate resources.From Azure CLIβ
To identify Diagnostic Settings on a subscription:
... see more
Remediationβ
Remediationβ
From Azure Portalβ
To enable Diagnostic Settings on a Subscription:
- Go to
Monitor
.- Click on
Activity Log
.- Click on
Export Activity Logs
.- Click
+ Add diagnostic setting
.- Enter a
Diagnostic setting name
.- Select
Categories
for the diagnostic settings.- Select the appropriate
Destination details
(this may be Log Analytics, Storage Account, Event Hub, or Partner solution).- Click
Save
.To enable Diagnostic Settings on a specific resource:
- Go to
Monitor
.- Click
Diagnostic settings
.- Click on the resource that has a diagnostics status of
disabled
.- Select
Add Diagnostic Setting
.- Enter a
Diagnostic setting name
.- Select the appropriate log, metric, and destination. (this may be Log Analytics, Storage Account, Event Hub, or Partner solution).
- Click
Save
.Repeat these step for all resources as needed.
From Azure CLIβ
To configure Diagnostic Settings on a Subscription:
az monitor diagnostic-settings subscription create --subscription <subscription id> --name <diagnostic settings 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 "<JSON encoded categories>" (e.g. [{category:Security,enabled:true},{category:Administrative,enabled:true},{category:Alert,enabled:true},{category:Policy,enabled:true}])
... [see more](remediation.md)
policy.yamlβ
Linked Framework Sectionsβ
Section | Sub Sections | Internal Rules | Policies | Flags |
---|---|---|---|---|
πΌ CIS Azure v2.1.0 β πΌ 5.1.1 Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs - Level 1 (Manual) | 1 | |||
πΌ CIS Azure v3.0.0 β πΌ 6.1.1 Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs (Manual) | 1 | |||
πΌ Cloudaware Framework β πΌ Logging and Monitoring Configuration | 49 |