Using Console
Using CLI
az login
.az account set --subscription <subscription_id>
.az monitor log-profiles show --name <log_profile_name> --resource-group <resource_group_name>
. Replace <log_profile_name>
with the name of the log profile and <resource_group_name>
with the name of the resource group where the log profile is expected to be provisioned.az monitor log-profiles create --name <log_profile_name> --locations <location_name> --categories <category_name> --days <retention_days> --resource-group <resource_group_name>
. Replace <log_profile_name>
with the name of the new log profile, <location_name>
with the location where the log data should be stored, <category_name>
with the category of logs to be collected, <retention_days>
with the number of days to retain the logs, and <resource_group_name>
with the name of the resource group where the log profile should be provisioned.az monitor log-profiles show --name <log_profile_name> --resource-group <resource_group_name>
.az monitor log-profiles update --name <log_profile_name> --locations <location_name> --categories <category_name> --days <retention_days> --resource-group <resource_group_name>
.az monitor log-profiles show --name <log_profile_name> --resource-group <resource_group_name>
.Using Python