|
| 1 | +--- |
| 2 | +title: Manage and monitor costs for Microsoft Sentinel |
| 3 | +description: Learn how to manage and monitor costs and billing for Microsoft Sentinel by using cost analysis in the Azure portal and other methods. |
| 4 | +author: cwatson-cat |
| 5 | +ms.author: cwatson |
| 6 | +ms.custom: subject-cost-optimization |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 02/22/2022 |
| 9 | +--- |
| 10 | + |
| 11 | +# Manage and monitor costs for Microsoft Sentinel |
| 12 | + |
| 13 | +After you've started using Microsoft Sentinel resources, use Cost Management features to set budgets and monitor costs. You can also review forecasted costs and identify spending trends to identify areas where you might want to act. |
| 14 | + |
| 15 | +Costs for Microsoft Sentinel are only a portion of the monthly costs in your Azure bill. Although this article explains how to manage and monitor costs for Microsoft Sentinel, you're billed for all Azure services and resources your Azure subscription uses, including Partner services. |
| 16 | + |
| 17 | +## Prerequisites |
| 18 | + |
| 19 | +To view cost data and perform cost analysis in Cost Management, you must have a supported Azure account type, with at least read access. |
| 20 | + |
| 21 | +While cost analysis in Cost Management supports most Azure account types, not all are supported. To view the full list of supported account types, see [Understand Cost Management data](../cost-management-billing/costs/understand-cost-mgt-data.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn). |
| 22 | + |
| 23 | +For information about assigning access to Azure Cost Management data, see [Assign access to data](../cost-management/assign-access-acm-data.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn). |
| 24 | + |
| 25 | + |
| 26 | +## View costs by using cost analysis |
| 27 | + |
| 28 | +As you use Azure resources with Microsoft Sentinel, you incur costs. Azure resource usage unit costs vary by time intervals such as seconds, minutes, hours, and days, or by unit usage, like bytes and megabytes. As soon as Microsoft Sentinel use starts, it incurs costs, and you can see the costs in [cost analysis](../cost-management/quick-acm-cost-analysis.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn). |
| 29 | + |
| 30 | +When you use cost analysis, you view Microsoft Sentinel costs in graphs and tables for different time intervals. Some examples are by day, current and prior month, and year. You also view costs against budgets and forecasted costs. Switching to longer views over time can help you identify spending trends. And you see where overspending might have occurred. If you've created budgets, you can also easily see where they're exceeded. |
| 31 | + |
| 32 | +The [Azure Cost Management + Billing](../cost-management-billing/costs/quick-acm-cost-analysis.md) hub provides useful functionality. After you open **Cost Management + Billing** in the Azure portal, select **Cost Management** in the left navigation and then select the [scope](..//cost-management-billing/costs/understand-work-scopes.md) or set of resources to investigate, such as an Azure subscription or resource group. |
| 33 | + |
| 34 | +The **Cost Analysis** screen shows detailed views of your Azure usage and costs, with the option to apply various controls and filters. |
| 35 | + |
| 36 | +For example, to see charts of your daily costs for a certain time frame: |
| 37 | + |
| 38 | +1. Select the drop-down caret in the **View** field and select **Accumulated costs** or **Daily costs**. |
| 39 | +1. Select the drop-down caret in the date field and select a date range. |
| 40 | +1. Select the drop-down caret next to **Granularity** and select **Daily**. |
| 41 | + |
| 42 | + The costs shown in the following image are for example purposes only. They're not intended to reflect actual costs. |
| 43 | + |
| 44 | + :::image type="content" source="media/billing-monitor-costs/cost-management.png" alt-text="Screenshot of a cost management + billing cost analysis screen." lightbox="media/billing-monitor-costs/cost-management.png"::: |
| 45 | + |
| 46 | +You could also apply further controls. For example, to view only the costs associated with Microsoft Sentinel, select **Add filter**, select **Service name**, and then select the service names **Sentinel**, **log analytics**, and **azure monitor**. |
| 47 | + |
| 48 | +Microsoft Sentinel data ingestion volumes appear under **Security Insights** in some portal Usage Charts. |
| 49 | + |
| 50 | +The Microsoft Sentinel pricing tiers don't include Log Analytics charges. To change your pricing tier commitment for Log Analytics, see [Changing pricing tier](../azure-monitor/logs/manage-cost-storage.md#changing-pricing-tier). |
| 51 | + |
| 52 | +For more information, see [Create budgets](#create-budgets) and [Reduce costs in Microsoft Sentinel](billing-monitor-costs.md). |
| 53 | + |
| 54 | +## Using Azure Prepayment with Microsoft Sentinel |
| 55 | + |
| 56 | +You can pay for Microsoft Sentinel charges with your Azure Prepayment credit. However, you can't use Azure Prepayment credit to pay bills to third-party organizations for their products and services, or for products from the Azure Marketplace. |
| 57 | + |
| 58 | +## Run queries to understand your data ingestion |
| 59 | + |
| 60 | +Microsoft Sentinel uses an extensive query language to analyze, interact with, and derive insights from huge volumes of operational data in seconds. Here are some Kusto queries you can use to understand your data ingestion volume. |
| 61 | + |
| 62 | +Run the following query to show data ingestion volume by solution: |
| 63 | + |
| 64 | +```kusto |
| 65 | +Usage |
| 66 | +| where StartTime >= startofday(ago(31d)) and EndTime < startofday(now()) |
| 67 | +| where IsBillable == true |
| 68 | +| summarize BillableDataGB = sum(Quantity) / 1000. by bin(StartTime, 1d), Solution |
| 69 | +| extend Solution = iif(Solution == "SecurityInsights", "AzureSentinel", Solution) |
| 70 | +| render columnchart |
| 71 | +``` |
| 72 | + |
| 73 | +Run the following query to show data ingestion volume by data type: |
| 74 | + |
| 75 | +```kusto |
| 76 | +Usage |
| 77 | +| where StartTime >= startofday(ago(31d)) and EndTime < startofday(now()) |
| 78 | +| where IsBillable == true |
| 79 | +| summarize BillableDataGB = sum(Quantity) / 1000. by bin(StartTime, 1d), DataType |
| 80 | +| render columnchart |
| 81 | +``` |
| 82 | + |
| 83 | +Run the following query to show data ingestion volume by both solution and data type: |
| 84 | + |
| 85 | +```kusto |
| 86 | +Usage |
| 87 | +| where TimeGenerated > ago(32d) |
| 88 | +| where StartTime >= startofday(ago(31d)) and EndTime < startofday(now()) |
| 89 | +| where IsBillable == true |
| 90 | +| summarize BillableDataGB = sum(Quantity) by Solution, DataType |
| 91 | +| extend Solution = iif(Solution == "SecurityInsights", "AzureSentinel", Solution) |
| 92 | +| sort by Solution asc, DataType asc |
| 93 | +``` |
| 94 | + |
| 95 | +## Deploy a workbook to visualize data ingestion |
| 96 | + |
| 97 | +The **Workspace Usage Report workbook** provides your workspace's data consumption, cost, and usage statistics. The workbook gives the workspace's data ingestion status and amount of free and billable data. You can use the workbook logic to monitor data ingestion and costs, and to build custom views and rule-based alerts. |
| 98 | + |
| 99 | +This workbook also provides granular ingestion details. The workbook breaks down the data in your workspace by data table, and provides volumes per table and entry to help you better understand your ingestion patterns. |
| 100 | + |
| 101 | +To enable the Workspace Usage Report workbook: |
| 102 | + |
| 103 | +1. In the Microsoft Sentinel left navigation, select **Threat management** > **Workbooks**. |
| 104 | +1. Enter *workspace usage* in the Search bar, and then select **Workspace Usage Report**. |
| 105 | +1. Select **View template** to use the workbook as is, or select **Save** to create an editable copy of the workbook. If you save a copy, select **View saved workbook**. |
| 106 | +1. In the workbook, select the **Subscription** and **Workspace** you want to view, and then set the **TimeRange** to the time frame you want to see. You can set the **Show help** toggle to **Yes** to display in-place explanations in the workbook. |
| 107 | + |
| 108 | +## Export cost data |
| 109 | + |
| 110 | +You can also [export your cost data](../cost-management-billing/costs/tutorial-export-acm-data.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn) to a storage account. Exporting cost data is helpful when you need or others to do more data analysis for costs. For example, a finance team can analyze the data using Excel or Power BI. You can export your costs on a daily, weekly, or monthly schedule and set a custom date range. Exporting cost data is the recommended way to retrieve cost datasets. |
| 111 | + |
| 112 | +## Create budgets |
| 113 | + |
| 114 | +You can create [budgets](../cost-management/tutorial-acm-create-budgets.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn) to manage costs and create [alerts](../cost-management-billing/costs/cost-mgt-alerts-monitor-usage-spending.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn) that automatically notify stakeholders of spending anomalies and overspending risks. Alerts are based on spending compared to budget and cost thresholds. Budgets and alerts are created for Azure subscriptions and resource groups, so they're useful as part of an overall cost monitoring strategy. |
| 115 | + |
| 116 | +You can create budgets with filters for specific resources or services in Azure if you want more granularity in your monitoring. Filters help ensure that you don't accidentally create new resources that cost you more money. For more information about the filter options available when you create a budget, see [Group and filter options](../cost-management-billing/costs/group-filter.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn). |
| 117 | + |
| 118 | +## Use a playbook for cost management alerts |
| 119 | + |
| 120 | +To help you control your Microsoft Sentinel budget, you can create a cost management playbook. The playbook sends you an alert if your Microsoft Sentinel workspace exceeds a budget, which you define, within a given timeframe. |
| 121 | + |
| 122 | +The Microsoft Sentinel GitHub community provides the [`Send-IngestionCostAlert`](https://github.com/iwafula025/Azure-Sentinel/tree/master/Playbooks/Send-IngestionCostAlert) cost management playbook on GitHub. This playbook is activated by a recurrence trigger, and gives you a high level of flexibility. You can control execution frequency, ingestion volume, and the message to trigger, based on your requirements. |
| 123 | + |
| 124 | +## Define a data volume cap in Log Analytics |
| 125 | + |
| 126 | +In Log Analytics, you can enable a daily volume cap that limits the daily ingestion for your workspace. The daily cap can help you manage unexpected increases in data volume, stay within your limit, and limit unplanned charges. |
| 127 | + |
| 128 | +To define a daily volume cap, select **Usage and estimated costs** in the left navigation of your Log Analytics workspace, and then select **Daily cap**. Select **On**, enter a daily volume cap amount, and then select **OK**. |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | +The **Usage and estimated costs** screen also shows your ingested data volume trend in the past 31 days, and the total retained data volume. |
| 133 | + |
| 134 | +The daily cap doesn't limit collection of all data types. Security data is excluded from the cap. For more information about managing the daily cap in Log Analytics, see [Manage your maximum daily data volume](../azure-monitor/logs/manage-cost-storage.md#manage-your-maximum-daily-data-volume). |
| 135 | + |
| 136 | +## Next steps |
| 137 | + |
| 138 | +- [Reduce costs for Microsoft Sentinel](billing-reduce-costs.md) |
| 139 | +- Learn [how to optimize your cloud investment with Azure Cost Management](../cost-management-billing/costs/cost-mgt-best-practices.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn). |
| 140 | +- Learn more about managing costs with [cost analysis](../cost-management-billing/costs/quick-acm-cost-analysis.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn). |
| 141 | +- Learn about how to [prevent unexpected costs](../cost-management-billing/understand/analyze-unexpected-charges.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn). |
| 142 | +- Take the [Cost Management](/learn/paths/control-spending-manage-bills?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn) guided learning course. |
| 143 | +- For more tips on reducing Log Analytics data volume, see [Tips for reducing data volume](../azure-monitor/logs/manage-cost-storage.md#tips-for-reducing-data-volume). |
0 commit comments