Monitor log profile should be created Affecting Monitor service in Azure


Severity

0.0
medium
0
10
Severity Framework
Snyk CCSS
Rule category
Logging/ Logging

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CIS-AzureHIPAAISO-27001NIST-800-53PCI-DSSSOC-2
  • Snyk IDSNYK-CC-00687
  • creditSnyk Research Team

Description

Monitor log profile should be created. A log profile controls how an activity log is exported. By default, activity logs are retained only for 90 days. Log profiles 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.

How to fix?

Monitor log profile should be created. A log profile controls how an activity log is exported.

Example configuration

resource "azurerm_monitor_log_profile" "Allowed" {
  name = "example687amlp"

  categories = [
    "Action",
    "Delete",
    "Write",
  ]

  locations = [
    "westus",
    "global",
  ]

  storage_account_id = azurerm_storage_account.example687.id

  retention_policy {
    enabled = true
    days    = 7
  }
}