
John Hayes
Observability Advocate, SquaredUp

Managing cloud costs is essential for organizations leveraging the public cloud. With on-demand infrastructure, spending can quickly spiral out of control without the right visibility and accountability.
The public cloud has revolutionized IT by making infrastructure on-demand, scalable, and self-service. However, this convenience comes at a price. In the cloud, engineers can instantly spin up resources and spend company money with the click of a button or a line of code, bypassing traditional procurement and finance approval processes.
The FinOps Foundation outlines a number of core principles to guide organizations in managing cloud costs:
So, that’s the theory – let’s see what’s involved in putting it into practice. We’ll take the example of an engineering team that has responsibility for monitoring a web portal app running in the Azure cloud. They use a dashboard like the one below, which gives visibility into a number of key metrics such as Http errors and availability:

What if they wanted to adopt FinOps principles and also take responsibility for monitoring the costs of the application? The first step is to set up a budget. We will be using Azure, but budgeting is also a core feature of AWS and Google Cloud Platform. In this example we are setting a budget at Resource Group scope. This will give us a total cost for running the web app as well as any additional resources associated with it:

Now that we have our budget, we can monitor it in SquaredUp and set up alerts to notify team members if our thresholds are exceeded. We are going to add a new tile to our dashboard. Then, using the Azure data source, we can select the Budget Overview Data Stream

And then select our Resource Group in the object filter:

There are a number of options for how we can represent the budget but we have selected the gauge as it provides a clear visualisation of our current spend in relation to our budget.

Next, we can add a SquaredUp Monitor so that we can be alerted if expenditure exceeds our budget. The Monitor is already aware of the key fields relating to our budget:
· Budget amount
· Current expenditure
· Current Percent Budget Spend
This gives us a number of different options for setting up the alerting on our Monitor. In the example below we have defined the Current Percent Budget Spend as the trigger column. The Monitor will show a warning when expenditure exceeds 85% and an error when it exceeds 100% of our ceiling.

For total flexibility, you can even specify a script to define the conditions for the error and warning states. Once we have finished creating the monitor we can set up a notification. In SquaredUp, you set up notifications against one or more Monitors in a workspace.

As you can see – there is a whole range of channels including Teams, Slack, Email and more - you can even add your own custom integration.
At the moment, our team will be notified if we are approaching our budget limit or if we exceed it. However, we might want to act before an errant process or a misconfiguration has burned through 80% of our monthly budget in just a few days. As well as keeping an eye on budget thresholds, the team might also want to keep a lookout for any sudden spikes in costs. In the image below we have an example of a tile which shows cost differences on a daily basis:

Building this is really simple. We can just use the SquaredUp Azure Cost data stream and set the timeframe for a span such as the previous two days. This will generate a dataset consisting of two rows that will allow us to track cost changes from one day to the next. To calculate the percentage difference we have used the SquaredUp SQL Analytics feature. This allows us to query and transform our data using any DuckDB-compatible SQL statement:

Again, we can set up a Monitor to trigger a notification to our team if the percentage increase exceeds a certain threshold.
As well as being aware of any sudden spikes in our cloud costs, our team would also like to investigate the possible causes – were there any configuration changes or deployments that might have caused the spike. Below, we have two tiles pulling in relevant data from our Azure DevOps data source. These show Pull Requests and Deployments which we have filtered to the specific Repo and Azure DevOps project for our Web Portal. We can also define a custom timeframe so that we only display the most recent activity.

Using these data sources we can drill straight through to the relevant PR or deployment in Azure DevOps. Of course, SquaredUp has integrations with every major DevOps platform, so you can also pull in data from GitHub, GitLab, Circle CI, Jenkins and more.
With SquaredUp's wide range of integrations and our dedicated cost data streams you can frictionlessly connect to your cloud provider and extract the cost information your team needs. You can then build up workflows so that your team can be alerted to cost spikes and also have the context you need to investigate the cause. If you don’t have a SquaredUp account you can sign up for our free forever tier and start taking control of your cloud costs today.