0
votes

Background:

I've been searching for a way to properly monitor and create alerting on Azure cost for a resource group. All current monitoring and alerting seem to be related to budgets. You can set a budget, and can create alerts when you have spent more than x percent of that budget. However, suppose that I configure something wrong and create a resource that costs way too much money, and I burn through my monthly budget within a week. Now I will get an alert after a week, but the damage to my bill will already have been done.

What I am looking for: I'd like to have some way of alerting if my daily spending shows some abnormal behavior (or I've spent more than x dollar/euro/whatever currency in the last day, of the last x days). This way, I can proactively react to wrong settings, and not only react once I've burned up my budget.

What I already tried:

  • I looked for a built in way, but there doesn't seem to be one.
  • I tried to use azure powershell or the API to export by resource group's cost, but the Azure Powershell billing methods seem to be broken (see this thread), and the API's documentation is a mess. There are like a million ways of fetching billing data, but none of them seem to work properly or return any usable data for my situation.

My specific question:

I'm looking for a way to fetch the current billing period's cost overview, either via the API, or azure powershell, so I can import it and create my own alerts. However if somebody can provide an alternative approach to accomplish my goal your answer is also welcome

1

1 Answers

-1
votes

You can try the steps as below:

1.In azure portal, nav to your resource group.

2.In the left pane -> Cost Management -> Cost alerts(preivew) -> then click the Add button:

enter image description here

3.In the new page, fill in all the fields in 1. Create a budget and 2. Set alerts tab:

enter image description here