Skip to content

Commit eae10b5

Browse files
authored
Merge pull request #233085 from bwren/waf
Azure Monitor WAF service guide
2 parents 59f096d + a279c7a commit eae10b5

File tree

10 files changed

+258
-86
lines changed

10 files changed

+258
-86
lines changed

articles/azure-monitor/best-practices-cost.md

Lines changed: 56 additions & 78 deletions
Large diffs are not rendered by default.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Best practices for Azure Monitor Logs
3+
description: Provides a template for a Well-Architected Framework (WAF) article specific to Log Analytics workspaces in Azure Monitor.
4+
ms.topic: conceptual
5+
author: bwren
6+
ms.author: bwren
7+
ms.date: 03/29/2023
8+
ms.reviewer: bwren
9+
---
10+
11+
# Best practices for Azure Monitor Logs
12+
This article provides architectural best practices for Azure Monitor Logs. The guidance is based on the five pillars of architecture excellence described in [Azure Well-Architected Framework](/azure/architecture/framework/).
13+
14+
15+
16+
## Reliability
17+
In the cloud, we acknowledge that failures happen. Instead of trying to prevent failures altogether, the goal is to minimize the effects of a single failing component. Use the following information to minimize failure of your Log Analytics workspaces and to protect the data they collect.
18+
19+
[!INCLUDE [waf-logs-reliability](includes/waf-logs-reliability.md)]
20+
21+
22+
## Security
23+
Security is one of the most important aspects of any architecture. Azure Monitor provides features to employ both the principle of least privilege and defense-in-depth. Use the following information to maximize the security of your Log Analytics workspaces and ensure that only authorized users access collected data.
24+
25+
[!INCLUDE [waf-logs-security](includes/waf-logs-security.md)]
26+
27+
28+
## Cost optimization
29+
Cost optimization refers to ways to reduce unnecessary expenses and improve operational efficiencies. You can significantly reduce your cost for Azure Monitor by understanding your different configuration options and opportunities to reduce the amount of data that it collects. See [Azure Monitor cost and usage](usage-estimated-costs.md) to understand the different ways that Azure Monitor charges and how to view your monthly bill.
30+
31+
> [!NOTE]
32+
> See [Optimize costs in Azure Monitor](best-practices-cost.md) for cost optimization recommendations across all features of Azure Monitor.
33+
34+
[!INCLUDE [waf-logs-cost](includes/waf-logs-cost.md)]
35+
36+
37+
## Operational excellence
38+
Operational excellence refers to operations processes required keep a service running reliably in production. Use the following information to minimize the operational requirements for supporting Log Analytics workspaces.
39+
40+
[!INCLUDE [waf-logs-operation](includes/waf-logs-operation.md)]
41+
42+
43+
## Performance efficiency
44+
Performance efficiency is the ability of your workload to scale to meet the demands placed on it by users in an efficient manner. Use the following information to ensure that your Log Analytics workspaces and log queries are configured for maximum performance.
45+
46+
[!INCLUDE [waf-logs-performance](includes/waf-logs-performance.md)]
47+
48+
## Next step
49+
50+
- [Get best practices for a complete deployment of Azure Monitor](best-practices.md).

articles/azure-monitor/faq.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ sections:
506506
answer: |
507507
Yes, for experimental use. In the basic pricing plan, your application can send a certain allowance of data each month free of charge. The free allowance is large enough to cover development and publishing an app for a few users. You can set a cap to prevent more than a specified amount of data from being processed.
508508
509-
Larger volumes of telemetry are charged by the gigabyte. We provide some tips on how to [limit your charges](best-practices-cost.md#data-collection).
509+
Larger volumes of telemetry are charged by the gigabyte. We provide some tips on how to [limit your charges](best-practices-cost.md#application-insights).
510510
511511
The Enterprise plan incurs a charge for each day that each web server node sends telemetry. It's suitable if you want to use Continuous Export on a large scale.
512512
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
author: bwren
3+
ms.author: bwren
4+
ms.service: azure-monitor
5+
ms.topic: include
6+
ms.date: 03/30/2023
7+
---
8+
9+
### Design checklist
10+
11+
> [!div class="checklist"]
12+
> - Configure pricing tier for the amount of data that each Log Analytics workspace typically collects.
13+
> - Configure tables used for debugging, troubleshooting, and auditing as Basic Logs.
14+
> - Configure data retention and archiving.
15+
> - Regularly analyze collected data to identify trends and anomalies.
16+
> - Create an alert when data collection is high.
17+
> - Consider a daily cap as a preventative measure to ensure that you don't exceed a particular budget.
18+
19+
### Configuration recommendations
20+
21+
| Recommendation | Benefit |
22+
|:---|:---|
23+
| Determine whether to combine your operational data and your security data in the same Log Analytics workspace. | Since all data in a Log Analytics workspace is subject to Microsoft Sentinel pricing if Sentinel is enabled, there may be cost implications to combining this data. See [Design a Log Analytics workspace architecture](../logs/workspace-design.md) for details on making this decision for your environment balancing it with criteria in other pillars. |
24+
| Configure pricing tier for the amount of data that each Log Analytics workspace typically collects. | By default, Log Analytics workspaces will use pay-as-you-go pricing with no minimum data volume. If you collect enough data, you can significantly decrease your cost by using a [commitment tier](../logs/cost-logs.md#commitment-tiers), which allows you to commit to a daily minimum of data collected in exchange for a lower rate. If you collect enough data across workspaces in a single region, you can link them to a [dedicated cluster](../logs/logs-dedicated-clusters.md) and combine their collected volume using [cluster pricing](../logs/cost-logs.md#dedicated-clusters).<br><br>See [Azure Monitor Logs cost calculations and options](../logs/cost-logs.md) for details on commitment tiers and guidance on determining which is most appropriate for your level of usage. See [Usage and estimated costs](../usage-estimated-costs.md#usage-and-estimated-costs) to view estimated costs for your usage at different pricing tiers. |
25+
| Configure data retention and archiving. | There is a charge for retaining data in a Log Analytics workspace beyond the default of 31 days (90 days if Sentinel is enabled on the workspace and 90 days for Application insights data). Consider your particular requirements for having data readily available for log queries. You can significantly reduce your cost by configuring [Archived Logs](../logs/data-retention-archive.md), which allows you to retain data for up to seven years and still access it occasionally using [search jobs](../logs/search-jobs.md) or [restoring a set of data](../logs/restore.md) to the workspace. |
26+
| Configure tables used for debugging, troubleshooting, and auditing as Basic Logs. | Tables in a Log Analytics workspace configured for [Basic Logs](../logs/basic-logs-configure.md) have a lower ingestion cost in exchange for limited features and a charge for log queries. If you query these tables infrequently and don't use them for alerting, this query cost can be more than offset by the reduced ingestion cost. |
27+
| Regularly analyze collected data to identify trends and anomalies. | Use [Log Analytics workspace insights](../logs/log-analytics-workspace-insights-overview.md) to periodically review the amount of data collected in your workspace. In addition to helping you understand the amount of data collected by different sources, it will identify anomalies and upward trends in data collection that could result in excess cost. Further analyze data collection using methods in [Analyze usage in Log Analytics workspace](../logs/analyze-usage.md) to determine if there's additional configuration that can decrease your usage further. This is particularly important when you add a new set of data sources, such as a new set of virtual machines or onboard a new service. |
28+
| Create an alert when data collection is high. | To avoid unexpected bills, you should be [proactively notified anytime you experience excessive usage](../logs/analyze-usage.md#send-alert-when-data-collection-is-high). Notification allows you to address any potential anomalies before the end of your billing period. |
29+
| Consider a daily cap as a preventative measure to ensure that you don't exceed a particular budget. | A [daily cap](../logs/daily-cap.md) disables data collection in a Log Analytics workspace for the rest of the day after your configured limit is reached. This shouldn't be used as a method to reduce costs as described in [When to use a daily cap](../logs/daily-cap.md#when-to-use-a-daily-cap).<br><br>If you do set a daily cap, in addition to [creating an alert when the cap is reached](../logs/log-analytics-workspace-health.md#view-log-analytics-workspace-health-and-set-up-health-status-alerts),ensure that you also [create an alert rule to be notified when some percentage has been reached (90% for example)](../logs/analyze-usage.md#send-alert-when-data-collection-is-high). This gives you an opportunity to investigate and address the cause of the increased data before the cap shuts off data collection. |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
author: bwren
3+
ms.author: bwren
4+
ms.service: azure-monitor
5+
ms.topic: include
6+
ms.date: 03/30/2023
7+
---
8+
9+
### Design checklist
10+
11+
> [!div class="checklist"]
12+
> - Design a workspace architecture with the minimal number of workspaces to meet your business requirements.
13+
> - Use Log Analytics workspace insights to track the health and performance of your Log Analytics workspaces.
14+
> - Create alert rules to be proactively notified of operational issues in the workspace.
15+
16+
### Configuration recommendations
17+
18+
| Recommendation | Benefit |
19+
|:---|:---|
20+
| Design a workspace architecture with the minimal number of workspaces to meet your business requirements. | A single or at least minimal number of workspaces will maximize your operational efficiency since all of your operational and security data will be located in a single location increasing your visibility into potential issues and making patterns easier to identify. You minimize your requirement for [cross-workspace queries](../logs/cross-workspace-query.md) and need to manage the configuration and data for fewer workspaces.<br><br>You may have requirements for multiple workspaces, such as multiple tenants or regulatory compliance requiring multiple regions, but you should balance those requirements against a goal of creating the minimal number of workspaces. See [Design a Log Analytics workspace architecture](../logs/workspace-design.md) for a list of decision criteria. |
21+
| Use Log Analytics workspace insights to track the health and performance of your Log Analytics workspaces. | [Log Analytics workspace insights](../logs/workspace-design.md) provides a unified view of the usage, performance, health, agents, queries, and change log for all your workspaces. Review this information on a regular basis to track the health and operation of each of your workspaces. |
22+
| Create alert rules to be proactively notified of operational issues in the workspace. | Each workspace has an [operation table](../logs/monitor-workspace.md) that logs important activities affecting workspace. Create alert rules based on this table to be proactively notified when an operational issue occurs. You can use [recommended alerts for the workspace](../logs/log-analytics-workspace-health.md) to simplify the creation of the most critical alert rules. |
23+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: bwren
3+
ms.author: bwren
4+
ms.service: azure-monitor
5+
ms.topic: include
6+
ms.date: 03/30/2023
7+
---
8+
9+
### Design checklist
10+
11+
> [!div class="checklist"]
12+
> - Configure log query auditing and use Log Analytics workspace insights to identify slow and inefficient queries.
13+
14+
### Configuration recommendations
15+
16+
| Recommendation | Benefit |
17+
|:---|:---|
18+
| Configure log query auditing and use Log Analytics workspace insights to identify slow and inefficient queries. | [Log query auditing](../logs/query-audit.md) stores the compute time required to run each query and the time until results are returned. [Log Analytics workspace insights](../logs/log-analytics-workspace-insights-overview.md#query-audit-tab) uses this data to list potentially inefficient queries in your workspace. Consider rewriting these queries to improve their performance. Refer to [Optimize log queries in Azure Monitor](../logs/query-optimization.md) for guidance on optimizing your log queries. |
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
author: bwren
3+
ms.author: bwren
4+
ms.service: azure-monitor
5+
ms.topic: include
6+
ms.date: 03/30/2023
7+
---
8+
9+
Log Analytics workspaces offer a high degree of reliability without any design decisions. Conditions where a temporary loss of access to the workspace can result in data loss are often mitigated by features of other Azure Monitor components such as data buffering with the Azure Monitor agent.
10+
11+
The reliability situations to consider for Log Analytics workspaces are availability of the workspace and protection of collected data in the rare case of failure of an Azure datacenter or region. There is currently no standard feature for failover between workspaces in different regions, but there are strategies that you can use if you have particular requirements for availability or compliance.
12+
13+
Some availability features require a dedicated cluster. Since this requires a commitment of at least 500 GB per day from all workspaces in the same region, reliability will not typically be your primary criteria for including dedicated clusters in your design.
14+
15+
### Design checklist
16+
17+
> [!div class="checklist"]
18+
> - If you collect enough data for a dedicated cluster, create a dedicated cluster in an availability zone.
19+
> - If you require the workspace to be available in the case of a region failure, or you don't collect enough data for a dedicated cluster, configure data collection to send critical data to multiple workspaces in different regions.
20+
> - If you require data to be protected in the case of datacenter or region failure, configure data export from the workspace to save data in an alternate location.
21+
> - Create a health status alert rule for your Log Analytics workspace.
22+
23+
### Configuration recommendations
24+
25+
| Recommendation | Benefit |
26+
|:---|:---|
27+
| If you collect enough data, create a dedicated cluster in a region that supports availability zones. | Workspaces linked to a [dedicated cluster](../logs/logs-dedicated-clusters.md) located in a region that supports [availability zones](../logs/availability-zones.md#data-resilience---supported-regions) remain available if a datacenter fails. |
28+
| If you require the workspace to be available in the case of a region failure, or you don't collect enough data for a dedicated cluster, configure data collection to send critical data to multiple workspaces in different regions. | Configure your data sources to send to multiple workspaces in different regions. For example, configure DCRs for multiple workspaces for Azure Monitor agent running on virtual machines, and multiple diagnostic settings to collection resource logs from Azure resources. This configuration results in duplicate ingestion and retention charges so only use it for critical data.<br><br>Even though the data will be available in the alternate workspace in case of failure, resources that rely on the data such as alerts and workbooks wouldn't know to use this workspace. Consider storing ARM templates for critical resources with configuration for the alternate workspace in Azure DevOps or as disabled [policies](../../governance/policy/overview.md) that can quickly be enabled in a failover scenario. |
29+
| If you require data to be protected in the case of datacenter or region failure, configure data export from the workspace to save data in an alternate location. | The [data export feature of Azure Monitor](../logs/logs-data-export.md) allows you to continuously export data sent to specific tables to Azure storage where it can be retained for extended periods. Use [Azure Storage redundancy options](../../storage/common/storage-redundancy.md#redundancy-in-a-secondary-region) including GRS and GZRS to replicate this data to other regions. If you require export of [tables that aren't supported by data export](../logs/logs-data-export.md?tabs=portal#limitations) then you can use other methods of exporting data including Logic apps to protect your data. This is primarily a solution to meet compliance for data retention since the data can be difficult to analyze and restore back to the workspace. |
30+
| Create a health status alert rule for your Log Analytics workspace. | A [health status alert](../logs/log-analytics-workspace-health.md#view-log-analytics-workspace-health-and-set-up-health-status-alerts) will proactively notify you if a workspace becomes unavailable because of a datacenter or regional failure. |

0 commit comments

Comments
 (0)