Keeping Application Insights Costs Under Control

Application Insights (now part of Azure Monitor) uses a pay-per-GB-ingested model, and charges $2.30 per-GB once you exceed the monthly free limit of 5GB. It may surprise you (it certainly surprised me!) to see that by default an Application Insights resource doesn’t deploy with a daily cap of 0.161GB (5GB/month), but actually deploys with a daily cap of 100GB!

Application Insights default cap

Left unchecked each resource like this could end up costing you a cool $7,118.50 per month.

In order to vet your estate and bring it under control, the PowerShell script below will check every Application Insights resource you have deployed against a limit you set, and optionally reduce anything exceeding that limit to a more reasonable cap.

Lower that daily cap

In the above example I ran the script against a newly deployed resource, configured to reduce anything with a cap greater than 10GB down to 1GB.

[Read More]

Should I Automate It?

Whenever you need to do something more than once it’s often tempting to invest in the process - either by making it easier to repeat or fully automating it.

This post isn’t about convincing you that it’s time to automate that thing (if you’re not already ‘automate by default’ go check out XKCD 1205 - once you are fully on the automation train come back here). This post is about giving you another tool to help decide to not automate that thing.

Automation Calculator

Download the Calculator to follow along!

[Read More]

Understanding space usage in Azure Monitor logs

Data ingested to Azure Monitor logs is billed per-Gigabyte ingested. As a workspace will typically grow to have data coming from many different sources and solutions it is helpful to have a set of queries that allow you to quickly drill into where exactly the GBs (or TBs!) of data you have stored comes from.

I’ve found the below queries very helpful starting points for three main scenarios:

  • Regular monitoring (once/month) to see how data volumes are trending
  • Reacting to a monitoring alert based on overall ingestion volumes
  • Testing out a configuration change/new solution and observing the impact on data ingested

The latter is particularly important before rolling a change to a workspace with long retention - you wouldn’t want (hypothetically :)) to accidentally ingest 100GB of IIS logs and then be forced to retain them for 2 years…

[Read More]

Auto scale down all Event Hub namespaces with Azure Functions

A little over a year ago I lamented the lack of an auto-deflate feature for Event Hubs, and offered a way to programatically scale down your namespaces. That solution still works, but requires a redeploy each time you wanted to add a namespace. Today we’ll look at an upgraded function app which programatically discovers and scales-down all Event Hub namespaces it has access to.

With the addition of a PowerShell script to grant the appropriate permissions to all of your namespaces, you can be up and running (or deflating) in a matter of minutes.

[Read More]