%3CLINGO-SUB%20id%3D%22lingo-sub-2006003%22%20slang%3D%22en-US%22%3EIngestion%20Cost%20Alert%20Playbook%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2006003%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EOverview%20of%20the%20Logic%20App%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2201-overview.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242026i4EC4CA5772361412%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%2201-overview.png%22%20alt%3D%2201-overview.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2202-overview.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242028iF5D4181279B652E7%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%2202-overview.png%22%20alt%3D%2202-overview.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EThe%20Logic%20App%20is%20activated%20by%20a%20Recurrence%20trigger%20whose%20frequency%20of%20execution%20can%20be%20adjusted%20to%20your%20requirements%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2203-reccurence.png%22%20style%3D%22width%3A%20437px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242029i4F2B21628D2EAB08%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2203-reccurence.png%22%20alt%3D%2203-reccurence.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESince%20the%20Logic%20App%20is%20being%20deployed%20from%20an%20ARM%20template%20you%20will%20need%20to%20make%20connections%20to%20Azure%20Monitor%2C%20Office%20365%20and%20Teams%20before%20the%20Logic%20App%20can%20work%20in%20your%20environment.%20You%20can%20expect%20to%20see%20windows%20like%20the%20one%20below.%20Click%20%E2%80%9CAdd%20new%E2%80%9D%20to%20create%20a%20connection%20to%20Azure%20Monitor%20and%20subsequently%20perform%20a%20similar%20operation%20for%20the%20%E2%80%9CSend%20and%20e-mail%E2%80%9D%20and%20%E2%80%9CSend%20a%20Teams%20message%E2%80%9D%20steps.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2204-connections.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242030iAE51E05492291008%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%2204-connections.png%22%20alt%3D%2204-connections.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EThe%20below%20variables%20are%20all%20declared%20as%20integers%20and%20can%20be%20used%20to%20specify%20values%20that%20suit%20your%20requirements.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2205-variables.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242031i76C018C6E0FD0384%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%2205-variables.png%22%20alt%3D%2205-variables.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EThe%20query%20below%20will%20then%20run%20against%20your%20workspace%20and%20computes%20the%20aggregated%20cost%20of%20billable%20tables%20in%20your%20Azure%20Monitor%20Workspace.%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2206-query.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242032i91EAC5595878A74C%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%2206-query.png%22%20alt%3D%2206-query.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EBelow%20is%20the%20query%20being%20executed%20in%20the%20step%20above%20in%20text%20format%20which%20you%20can%20use%20for%20validation%20directly%20in%20the%20Log%20Analytics%20query%20window.%20Ensure%20to%20replace%20the%20variables%20below%20with%20actual%20numbers%20if%20running%20the%20query%20within%20the%20Log%20Analytics%20query%20window.%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3Elet%26nbsp%3Bprice_per_GB%26nbsp%3B%3D%26nbsp%3Bprice_per_GB%3B%3C%2FP%3E%0A%3CP%3Elet%26nbsp%3Bhow_many_days%26nbsp%3B%3D%26nbsp%3Bhow_many_days%3B%3C%2FP%3E%0A%3CP%3Elet%26nbsp%3Btotal_funding%26nbsp%3B%3D%26nbsp%3Btotal_funding%3B%3C%2FP%3E%0A%3CP%3Elet%26nbsp%3Bthreshold_per_day%26nbsp%3B%3D%26nbsp%3Btoreal(total_funding)%26nbsp%3B%2F%26nbsp%3Btoreal(how_many_days)%3B%3C%2FP%3E%0A%3CP%3EUsage%3C%2FP%3E%0A%3CP%3E%7C%26nbsp%3Bwhere%26nbsp%3BTimeGenerated%26nbsp%3B%26gt%3B%26nbsp%3Bstartofday(ago(1d))%3C%2FP%3E%0A%3CP%3E%7C%26nbsp%3Bwhere%26nbsp%3BIsBillable%26nbsp%3B%3D%3D%26nbsp%3Btrue%3C%2FP%3E%0A%3CP%3E%7C%26nbsp%3Bsummarize%26nbsp%3BAggregatedValue%3D%26nbsp%3Bsum(Quantity)%26nbsp%3B*%26nbsp%3Bprice_per_GB%26nbsp%3B%2F%26nbsp%3B1000%26nbsp%3Bby%26nbsp%3Bbin(TimeGenerated%2C%26nbsp%3B1d)%3C%2FP%3E%0A%3CP%3E%7C%26nbsp%3Bwhere%26nbsp%3BAggregatedValue%26nbsp%3B%26gt%3B%26nbsp%3Bthreshold_per_day%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EIn%20this%20step%2C%20the%20aggregated%20value%20obtained%20from%20the%20previous%20step%20is%20compared%20against%20the%20budget%20value%20you%20set%20and%20should%20it%20exceed%20the%20amount%20then%20the%20logic%20branches%20to%20the%20left%20and%20sends%20out%20an%20e-mail%20or%20a%20Microsoft%20Teams%20message.%20If%20you%20are%20still%20within%20budget%2C%20then%20the%20logic%20branches%20to%20the%20right%20and%20no%20message%20is%20sent.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2202-overview.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242034i09338663BF813641%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%2202-overview.png%22%20alt%3D%2202-overview.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EIn%20the%20final%20step%20below%20sends%20out%20an%20e-mail%20to%20the%20specified%20recipient%20list%20and%20a%20message%20is%20posted%20in%20a%20Microsoft%20Teams%20channel%20of%20your%20choice%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2208-sendmessage.png%22%20style%3D%22width%3A%20392px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242035i7C6604FAD8519AC4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%2208-sendmessage.png%22%20alt%3D%2208-sendmessage.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EAdditional%20information%20on%20cost%20alerts%20can%20be%20found%20in%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fplatform%2Fmanage-cost-storage%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Edocument%3C%2FA%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2006003%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22blog%20banner-ICA.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F242036iAF931DF22D1569E8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22blog%20banner-ICA.png%22%20alt%3D%22blog%20banner-ICA.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EManaging%20cost%20for%20cloud%20services%20is%20an%20essential%20part%20of%20ensuring%20that%20you%20get%20maximum%20value%20for%20your%20investment%20in%20solutions%20running%20on%20this%20computing%20platform.%20Azure%20Sentinel%20is%20no%20different.%20To%20help%20you%20exercise%20greater%20control%20over%20your%20budget%20for%20Azure%20Sentinel%20%26nbsp%3Bthis%20playbook%20will%20send%20you%20an%20alert%20should%20you%20exceed%20a%20budget%20that%20you%20define%20for%20your%20Azure%20Sentinel%20Workspace%20within%20a%20given%20time-frame.%20The%20solutions%20also%20available%20on%20Github%20on%20this%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fiwafula025%2FAzure-Sentinel%2Ftree%2Fmaster%2FPlaybooks%2FSend-IngestionCostAlert%22%20rel%3D%22noopener%20noreferrer%22%20target%3D%22_blank%22%3Elink%3C%2FA%3E%20.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

blog banner-ICA.png

Managing cost for cloud services is an essential part of ensuring that you get maximum value for your investment in solutions running on this computing platform. Azure Sentinel is no different. To help you exercise greater control over your budget for Azure Sentinel  this playbook will send you an alert should you exceed a budget that you define for your Azure Sentinel Workspace within a given time-frame. The solution is also available for deployment from Github on this link .

 

Overview of the Logic App

01-overview.png

02-overview.png

 

The Logic App is activated by a Recurrence trigger whose frequency of execution can be adjusted to your requirements

03-reccurence.png

 

Since the Logic App is being deployed from an ARM template you will need to make connections to Azure Monitor, Office 365 and Teams before the Logic App can work in your environment. You can expect to see windows like the one below. Click “Add new” to create a connection to Azure Monitor and subsequently perform a similar operation for the “Send and e-mail” and “Send a Teams message” steps.

04-connections.png

 

The below variables are all declared as integers and can be used to specify values that suit your requirements.

05-variables.png

 

The query below will then run against your workspace and computes the aggregated cost of billable tables in your Azure Monitor Workspace.

06-query.png

Below is the query being executed in the step above in text format which you can use for validation directly in the Log Analytics query window. Ensure to replace the variables below with actual numbers if running the query within the Log Analytics query window.

let price_per_GB = price_per_GB;

let how_many_days = how_many_days;

let total_funding = total_funding;

let threshold_per_day = toreal(total_funding) / toreal(how_many_days);

Usage

| where TimeGenerated > startofday(ago(1d))

| where IsBillable == true

| summarize AggregatedValue= sum(Quantity) * price_per_GB / 1000 by bin(TimeGenerated, 1d)

| where AggregatedValue > threshold_per_day

 

In this step, the aggregated value obtained from the previous step is compared against the budget value you set and should it exceed the amount then the logic branches to the left and sends out an e-mail or a Microsoft Teams message. If you are still within budget, then the logic branches to the right and no message is sent.

 

02-overview.png

 

In the final step below sends out an e-mail to the specified recipient list and a message is posted in a Microsoft Teams channel of your choice

08-sendmessage.png

Additional information on cost alerts can be found in this document

 

 

9 Comments
Occasional Contributor

Am I blind or some of the logic app actions which are shown in above snips are not available when deployed the playbook from Github? (for eg, foreach loop which is showing here in the above post, but when I tried to deploy the playbook from the above GitHub link, I cannot see some logic app actions)

 

Also, the kql query is different from the above snips with the query in the deployed logic app. Can someone please help me if I'm missing any understanding here?

Occasional Contributor

@Innocent Wafula  This feature is very cool. I have a problem with that and maybe you can help me.

 

We have some customers in the process of aligning about closing a partnership to obtain Azure Sentinel, however, now and then we are asked about the average expense that they may have through the acquisition of the solution so that the customer “projects” what average consumption they will have.

I did some research on the web and found some content about average consumption of EPS by solutions and average log size of them, however, I did not feel "firm" with such information.

 

I know it is subjective and depends on each solution / technology, among other variables, however, I would like to know if someone has / indicates some type of material / spreadsheet or something like that I can help “price” a new customer for Azure acquisition Sentinel.

 

Ex: Knowing on average that the customer has X equipment and technologies, as well as the EPS and average size of the logs of these artifacts, they arrive at an approximate value of X, we can “stipulate” that they will be ingested in Sentinel “X GB”, which in turn , can result in “X” values.

 

 

Super Contributor

It appears the "Deploy to Azure" button in GitHub is deploying the wrong project. It creates the playbook for detecting if a service is no longer sending data.

Microsoft

@Gary Bushey   and @AlphaBetaGamma I usually deploy to Azure using the raw ARM and "Deploy a Custom Template" and selecting "Build your own template in the editor" within the Azure Portal. Hasn't failed me yet. 

 

Peter_PIper_1-1608690030207.png

 

 

Peter_PIper_0-1608689969475.png

 

Microsoft

@Gary Bushey thanks for catching this, my apologies. Let me fix that. Meanwhile you can use the method proposed by Peter

Microsoft

Hi @AlphaBetaGamma yes the issue is because the Deploy button points to a different Logic App. This will be resolved soonest and I'll post a confirmation here but in the meantime please use the route suggested by @Peter_Piper above

Microsoft

@AlphaBetaGamma  and @Gary Bushey  the Deploy button has now been fixed. You can retry

Microsoft

 Hi @Luizao_f thanks for the feedback. Your follow up question requires an in-depth response. Permit me to respond after the holidays -:)

Microsoft

Happy New Year @Luizao_f  

First off, Microsoft provides estimates using public facing tools with this disclaimer: Resulting data usage and prices are estimates only.  Actual data usage and prices may vary depending upon many factors, including customer environment, date of purchase, currency of payment, and type of agreement with Microsoft, Region of data ingestion & retention & Pricing model.  Accurately determining before  actual usage is quite a daunting task because our cost model is primarily based on GBs ingested from sources that are both Microsoft & non-Microsoft so the more accurately you determine that the more closer you get to your consumption estimate. The best way to get an idea of future costs is to run a limited pilot with target data sources. However, the public-facing resources we currently have available to help you estimate usage are per below:

 

Cost drivers:

Azure Sentinel Ingestion: Azure Sentinel Pricing | Microsoft Azure

Log Analytics Ingestion: https://azure.microsoft.com/en-us/pricing/details/log-analytics/

Log Analytics retention: https://azure.microsoft.com/en-us/pricing/details/log-analytics/

Automation-Logic Apps: https://azure.microsoft.com/en-us/pricing/details/logic-apps/

Bring Your Own ML: https://azure.microsoft.com/en-us/pricing/details/machine-learning-studio/ & https://azure.microsoft.com/en-us/pricing/details/databricks/

UEBA-5-10% over and above cost of selected data sources

 

(Not a Microsoft resource) - Log point provide a public-facing calculator here but you would use it based on their own disclaimer terms SIEM Storage Calculator | LogPoint

 

For historical Azure Sentinel costs, this workbook would be useful: Usage reporting for Azure Sentinel - Microsoft Tech Community

 

If you are a Microsoft partner I would suggest you get in touch with your Microsoft rep, they would have access to some internal resources that can help you better size future consumption. Hope this helps