alert on azure cost before budget has been reached - azure

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

Note the 1st answer was accurate, but I think you may not have made it to the second tab, Set alerts, where you can choose to set an alert at a percentage of the budget you just set up. See the Set alerts screen below.
I had a similar question, and you might have had the same concern. The resource manager has already set a budget, and I don't want to set a new budget, just an alert. So you can choose to Add a new budget if you wish, but you may also be able to:
Go to Budgets to find existing, primary budget
Select Edit budget (verify this accurately reflects your real/total budget)
Click on Set alerts
Create alerts as a percentage of the budget
I read that Azure allows you to go over budget. This month, my team went over budget, I want to keep the service open and am hoping for cheaper future months. To ensure things don't really get out of control, I've set up new, far-over-budget alerts. So for example, I now have 50, 90, 100, 200, and 300% alerts.
Set alerts tab within Create Budget screen

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:
3.In the new page, fill in all the fields in 1. Create a budget and 2. Set alerts tab:

Related

Create Azure Budget Alert through terraform

I'm trying to replicate the process of creating an Azure budget alert in the portal through terraform.
In the portal, I navigate to Cost Management + Billing, then onto cost alerts and I'm able to create a alert with my conditions for the entire subscription for the budget not to exceed a certain amount otherwise to send an email to a specific group or person.
I'm able to create an action group in terraform through azurerm_monitor_action_group but how do I create an alert for the budget. I don't see any valid documentations for it.
I found this provider that can be leveraged into terraform to create budget alert for the time being. Hope this helps anyone looking
https://registry.terraform.io/providers/innovationnorway/azure-preview/latest/docs/resources/azurepreview_budget
As of March 16, 2021 it is still WIP, but the feature is coming.
You can track the progress here:
https://github.com/terraform-providers/terraform-provider-azurerm/issues/2677
https://github.com/terraform-providers/terraform-provider-azurerm/pull/9201

How to see detailed cost breakdown for Azure subscription

I can't understand how to see the detailed breakdown of costs behind my Azure charges.
I tried the cost management and billing options within the Azure portal, but just got lots of graphs with no clear idea whether I am looking at totals or how to drill into.
I expected to be able to download detail, but can only see confusing graphs
I eventually found you need to follow this exact process to download the actual transactional data from the portal:
Azure portal -> Cost analysis
Select relevant dates from the menu at the top
Granularity -> daily
Group by -> Meter
Change the small graph symbol in the top right to be a table
Now can chose Export and you will be able to download all detail to excel / csv to analyse yourself without having to use the Azure pre-canned 'helpful' graphs.
As far as I can tell if any of the above steps are not followed, the download doesn't give you the transactions.
To see usage details for an Azure subscription:
Go to Cost Management + Billing
Select your subscription
On the Overview blade, click the Manage button which takes you to the Billing Overview
Select the subscription to see details for
The sidebar on the right has actions you can do. One is Download usage details

How can we set an alert, in Azure Application Insight, If daily data volume limit is crossed?

I want to send an alert to application Insight specific user/users(Other then subscription administrator) when daily data volume limit is reached in application Insight.
The current answer: "Not right now"
From the team that owns this functionality:
We will be making this a proper metric that customers can use as a regular metric, then they can do any metric alerts and other scenarios they want to do (including SMS, etc.)
It’s on the backlog to fix this experience correctly.
so right now, no you can't alert on it.
subscription admins should be getting an email when you hit the cap, and if you go to the activity log for that application insights resource, you should be able to see an operational event for it:

Azure live cost monitoring

In my Azure environment I am often tinkering around, adding new services, scaling roles up and down, etc. The problem is that I am always unsure as to how I may have affected my monthly bill. I'm also scared of forgetting to kill services after I don't need them (for example, I mistakenly had a Reporting Service running for a few weeks - very expensive!).
I'm looking for an add-on or service which can give be a basic idea of how much money I am consuming in Azure. I don't need something complicated. A graph or two could be great (perhaps a burn down).
I found these but without luck:
Foglight for Azure: This didn't work for me. All my figures showed up as 0.
Active Cloud Monitoring: This has been removed from the Azure add-ons.
Does anyone know of such a solution?
thank you for the question and the feedback. The new Azure portal, which is currently in public preview, does have this feature. You can try out the new portal at https://portal.azure.com/ . Once there, click on Billing tab on the left of the screen, which should bring up a billing summary for all your subscriptions. Click on the subscription that you need to check, and that will show you the billing details for that subscription. Details include subscription status, days left, current charges, burn down, and a breakdown of current charges by resource.
Please try this out and send your feedback using the "Give feedback" link at the top of the new portal page. You will have to click on your account name to see the "Give feedback" option in the drop down.
If you are using "Enterprise Agreement" as a billing option, the Azure portal does not provide sufficient billing information.
You could use Microsoft Power BI to import the data from Azure and use it for reporting. In Power BI you can use the Content pack "Microsoft Azure Enterprise" and connect it to your subscription. You will need the Enrollment number for your Enterprise Agreement and an API key to access the data.
A detailed explanation can be found in this blog entry.

Azure Subscription Disabled

We belong to bizspark program and have an Azure subscription that has been disabled.
Unfortunately, we don't know why and how to see what percentage of our resources is spent.
Anyone know also when Bizspark subscriptions are reenabled?
Your account has been disabled because you have reached your spending limit.
To get more information:
Go to manage.windowsazure.com
click on your email address in the top right corner
select Account
Log in
Click on your subscription and you can view a summary of charges
If you want your account to be re-enabled for this period, you will have to adjust your spending limit above $0. Be careful though, once you do that, I don't think you can go back.
Try going to https://account.windowsazure.com/Subscriptions (log in if necessary), and once you're there, click on the subscription in question. That should take you to a summary page on the billing for the account.
By default, it shows only the common usage metrics - it's likely you have exceeded one of these, and it should be easy to figure out which component put you over, but if not, try clicking the drop down that says "Show Common Usage" and change that to "Show All Usage".
As to your second question, the disable/re-enable cycle happens monthly, and if you've had your account for more than a month, it should have "snapped" to a period that spans from the first to the last of the month. If not, your period could be different, spanning from the first day you had the account to 30 days after, and "snapping" at that point, or it could be a pro-rated period that is from the first day of your account to the last day of the same month, with usage quotas pro-rated into it.
Regardless, your stuff should be re-enabled on the first day of the next billing period (which could be today, or perhaps September 1st, depending on what put you over).
I did face a similar issue with manage.windowsazure.com portal, but I'm successful in creating apps/site with the same subscription on the new portal (portal.azure.com). Once after creating an App/site in the new portal, this problem is resolved (even I'm able to publish from Visual Studio).
Hope this helps someone.
I had this problem but had definitely not reached my spending limit, I had $100 credit left. Yet I was getting the following message
We were unable to find any Active subscriptions associated with your account. SIGN UP FOR WINDOWS AZURE PRODUCTION PORTAL WINDOWS AZURE HOME PAGE CONTACT SUPPORT
In my case, it was because I had logged in to MSDN at some time with company credentials. So although the URL for my azure indicated my username and account such as:
https://manage.windowsazure.com/#mynamegmail.onmicrosoft.com#Workspaces/All/dashboard
Even though I had already selected sign out on MSDN, Somehow it was mixing the two accounts. I had to sign out of Azure from the Manage Azure screen and sign back in again with my personal Microsoft account.

Resources