π‘οΈ 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 - Tags:
- βͺ Impossible policy
- π’ Policy with categories
- π’ Policy with type
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
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 settingsexists for the selected Subscription.To identify Diagnostic Settings on specific resources:
- Go to
Monitor.- Click
Diagnostic settings.- Ensure that Diagnostics status is
enabledon 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
Categoriesfor 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 | Compliance |
|---|---|---|---|---|---|
| πΌ CIS Azure v2.1.0 β πΌ 5.1.1 Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs - Level 1 (Manual) | 1 | no data | |||
| πΌ CIS Azure v3.0.0 β πΌ 6.1.1 Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs (Manual) | 1 | no data | |||
| πΌ CIS Azure v4.0.0 β πΌ 7.1.1.1 Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs (Manual) | 1 | no data | |||
| πΌ Cloudaware Framework β πΌ Logging and Monitoring Configuration | 65 | no data |