diff --git a/docs/content/services/migration/_index.md b/docs/content/services/migration/_index.md new file mode 100644 index 000000000..f44aa4d09 --- /dev/null +++ b/docs/content/services/migration/_index.md @@ -0,0 +1,18 @@ ++++ +title = "Migration" +description = "Migration Services" +date = 2023-10-11T10:12:16Z +draft = false ++++ + +This page lists all of the Azure Services under the Migration category for which the APRL has guidance, recommendations and queries for. + +## Services List + +{{< alert style="info" >}} + +The below list of services is automatically populated based on the child folders and files in this directory within the source code in the repo. + +{{< /alert >}} + +{{< childpages >}} diff --git a/docs/content/services/monitoring/log-analytics/_index.md b/docs/content/services/monitoring/log-analytics/_index.md index 1e6cb994f..77307aa48 100644 --- a/docs/content/services/monitoring/log-analytics/_index.md +++ b/docs/content/services/monitoring/log-analytics/_index.md @@ -20,6 +20,7 @@ The below table shows the list of resiliency recommendations for Log Analytics a | [LOG-2 - Link Log Analytics Workspace to an Availability Zone enabled dedicated cluster](#log-2---link-log-analytics-workspace-to-an-availability-zone-enabled-dedicated-cluster) | Medium | Preview | Yes | | [LOG-3 - Configure data collection to send critical data to multiple workspaces in different regions](#log-3---configure-data-collection-to-send-critical-data-to-multiple-workspaces-in-different-regions) | Medium | Preview | No | | [LOG-4 - Create a health status alert rule for your Log Analytics workspace](#log-4---create-a-health-status-alert-rule-for-your-log-analytics-workspace) | Low | Preview | No | +| [LOG-5 - Configure minimal logging and retention of logs](#log-5---configure-minimal-logging-and-retention-of-logs) | Low | Preview | Yes | {{< /table >}} {{< alert style="info" >}} @@ -129,3 +130,31 @@ A health status alert will proactively notify you if a workspace becomes unavail {{< /collapse >}}

+ +### LOG-5 - Configure minimal logging and retention of logs + +**Category: Monitoring** + +**Impact: Low** + +**Guidance** + + Azure Monitor Logs automatically retains log data for a specific period of time depending on the data type (for example, 31 days for platform logs and metrics). However, you may need to retain your data for longer periods for compliance or business reasons. You can configure the data retention settings based on your requirements. + + For long-term storage, it might be necessary to move logs from Azure Monitor to a more cost-effective storage solution, such as Azure Blob Storage. This allows you to keep logs for an extended period of time without incurring high costs. + +**Resources** + +- [Data retention and archive in Azure Monitor Logs](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-retention-archive?tabs=portal-1%2Cportal-2) +- [Run search jobs in Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/search-jobs?tabs=portal-1%2Cportal-2) +- [Restore logs in Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/restore?tabs=api-1) + +**Resource Graph Query/Scripts** + +{{< collapse title="Show/Hide Query/Script" >}} + +{{< code lang="sql" file="code/log-5/log-5.kql" >}} {{< /code >}} + +{{< /collapse >}} + +

diff --git a/docs/content/services/monitoring/log-analytics/code/log-5/log-5.kql b/docs/content/services/monitoring/log-analytics/code/log-5/log-5.kql new file mode 100644 index 000000000..20dc3d867 --- /dev/null +++ b/docs/content/services/monitoring/log-analytics/code/log-5/log-5.kql @@ -0,0 +1,6 @@ +//Configure minimal logging and retention of logs. +//Query to get the list of Log analytics workspaces and their current configured retention period +resources +| where type == "microsoft.operationalinsights/workspaces" +| extend RetentionPeriod = tostring(properties.retentionInDays), SkuName=tostring(properties.sku.name) +| project recommendationId="log-5", name,location,resourceGroup,RetentionPeriod,SkuName,subscriptionId