Azure Cost Management Tutorial | Analyzing and reacting to changes in billing

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys this Adam and did you know that in Azure there's a service that allows you to explore cause for your subscription resource groups and specific resources and the best of it is free of charge this is introduction to outer cost management service stay tuned [Music] our cost management is a centralized service and a solution in Azure that allows you to control and monitor costs of your resources and it does that through several features like cost analysis hours and budgets offline experts like you can automate export or you can access that are directly through REST API additionally you can connect with out-of-the-box connector from power bi and power bi applications if you want to do self-service analytics on the cost of your other subscriptions so when it comes to cost analysis first of all there's a billing account support billing account currently there are three types either you have Microsoft online services program Enterprise Agreement or Microsoft customer agreement if you're just starting with Azure you most likely have the first option so it's pay-as-you-go accounts free our accounts or visual studio subscription for learning purposes if you're a big company you either have Enterprise Agreement or Microsoft customer agreement and when it comes to analysis of the cost for you are your subscription depending on the billing account that you have you have different scopes a scope is a unit that allows you to group the costs and if you have Microsoft online services program to scopes that you have out-of-the-box our billing account and subscription scopes so you can review all the costs for entire billing account or on a specific subscription and when it comes to scopes in subscriptions you can use resource management scopes so you can review the cost on management group subscriptions or even resource groups which is pretty cool because it allows you to do this drill down analysis to find the specific resources that drives your cost and allows you to optimize your subscriptions to be as cost-effective as possible but additionally thanks to those scopes you can actually assign access to someone to a specific subscription management group or even resource group so that foreign as department owners or owners of the application can analyze the cost himself and find the most costly services and try to optimize it themselves which allows you to scale much better than if the single person would be doing this job when it comes to management groups remember that they can be nested which allows you to represent your organization as management groups apply some additional policies but also track costs in management groups which of course in a single management group you can contain multiple subscription and each subscription can contain multiple resource groups and additionally you have multiple views so you have used for accumulated cost actuals forecasting even you have some granularity is P vaults and tables you've got quite a lot of use out of the box for you to do basic analysis remember that other cost management is not a bi tool so it doesn't have all the fancy features of power bi that's why we have power bi but in here you have the most commonly used features that you would need to perform the most basic drill down analysis with that said we can actually go into Azure portal and explore this a little bit because our cost management is a centralized service there are multiple ways to access this one of these ways is many on the left hand side where you have cost management and billing you can also find it in a search by by typing cost which will bring out cost management and billing this is pretty much the same option but remember about the scopes this is the centralized service so even if you go to any kind of resource for instance resource groups and pick any kind of resource group on the left hand side you will always find a cost analysis blade in this cost analysis you can review the cost for this specific resource group so you don't have to have access to the full subscription you can review a specific resource group if you have specific access on that research group that allows you to review the costs and billing information if you go to subscriptions for instance by typing subs and selecting specific subscription again you're gonna find that panel of cost analysis so it's pretty much anywhere in our report all you can get to the cost blade so let's go to cost analysis service the centralized one and in here first of all you have some basic information about the current billing account like who's the account admin was the billing start and end period was the currency billing region and what's this billing account type that I was talking about as you see I have Visual Studio subscription which is Microsoft online services program here you're gonna find a list of your subscription that you are owner of and you can review some additional stuff like invoices if you have any properties which contains your basic information payment methods if you have accounted credit cards here you can find this credit card info here and you can modify it and you have of course billing scopes inside of billing scopes at the top level you're gonna find my billing account but if you're gonna click into it you're gonna find yourself back to this overview panel so what you can do here is either click on a subscription and notice when you do that it will bring you to the same panel that we were previously moment ago which is by going to subscription and select new your subscription or what you can do is inside of the Boeing and cost management panel you can hit cost management here please notice something interesting because moment ago we were in a cost analysis on a resource group level our report on remembered what is the current scope which was the scope of that resource group that we were analyzing so you can actually go here and select the scope that you want to perform the analysis on for instance you can go level up to your subscription or you can go even higher level to management group I created one management group for the dis demo purposes which is one to one grouping with my subscription and of course he right now I will be only doing analysis by this subscription so I'm gonna select it and right now I will be automatically moved to cost analysis when I can review the costs for my subscription for the current period and after everything loads notice couple of stuff in here the first are the most important chart is accumulated cost if you want to change this you can change it from this view drop down here other views that you have as built-in views are caused by resource daily costs caused by service and invoice details if you want to review that includes information from your previous and current periods on this chart you will see two colors a dark green which is accumulated cause up to today's date which today is May 4th if you see that washed out green color that's the forecast if you have at least 10 days of billing data Microsoft will provide you in this panel the forecast for current use it so based on my current usage for the last 10 days Microsoft estimates that I'm gonna use 66 euros by the end of the current billing cycle on the bottom you have three panels showing you the cost by service name location and resource group name those costs shows you the most expensive service name locations and resource groups in your other subscription in your current scope currently we're reviewing subscription but of course you can always change the scope if you want to change the scope remember there's this button right here you can of course change these panels as well so if you don't want to review by location maybe you want to review it by specific resource just change this drop-down and you're gonna see the values of the most costly services in my case I can very quickly see it's a virtual machine called SQL gateway that is consuming the most on my other subscription and I quickly can navigate into that specific resource to find out why is that additionally what you can do here is for instance you can apply groupings groupings is a fantastic way to change the default views and when you can change it you can also change the granularity from accumulated to for instance daily daily is pretty cool because it will allow you to see all my costs growing day by day or not because it's very hard to see it with accumulated cost as you see here based on my last 10 days my daily usage will be growing but that of course is only forecast so maybe I will actually change the default billing cycle so you can actually change the period that you're looking at by either recommended or by invoices by invoices from the marketplace relative dates or maybe calendar month second switch to last month to see the actual of my resources in a previous month on daily basis and as you see there was a big spike around 3rd 4th of April right now I don't really know how and what does it happen that actually caused the spike so what you can additionally do you can change this group by two for instance service so let's change it to service name and in couple of seconds you will see that during 4th of April a new service appeared which started generating costs which is a virtual machine you can of course either unfilter these charts if you want but this is not very user-friendly way to do it but you can actually do it better is you use filters here on the top level you have filter you can select specific things that you want to filter from the chart so in this case I can use service name and since I know that I want to drill down into virtual machines let it load then I can select a filter and apply it right now I'm gonna only see data for virtual machines for the period of April 2020 which allows me again to change the grouping this time maybe I want to see a specific resource or resource group in this case I'm gonna select specific resource because I want to see if it's more virtual machines that had were created that day or only one and this diagram very very clearly shows that the most of the cost is generated by one VM which is this blue coral and SQL gateway VM if I would want to act on this information right now I could very easily go to Arjun research group that this is in which I saw that it was in SQL firewall demo and in here I can find my SQL gateway virtual machine which I can go to activity log and simply change the time span to last month this way I can review what happened to this virtual machine last month and as you see very easily I could find that around April 5th a virtual machine was started by me this is what was driving our costs and if we go back to the cost analysis this is what we just basically seen let's go back to cost management cost analysis and we're back to where we began so see see you have quite powerful tool to review the cost of your other subscription and other resources so what else do you get there because what I showed you right now is how you can find what was happening in the past but how you can react and manage costs for your other subscription using cost management first of all you can actually create budgets and alerts you already seen in the portal budgets and others but let's actually take them to for a spin and let's see how they work in real scenario so we have our other subscription and I see that the forecast is 60 euros let's imagine my budget my spending should not exceed 50 euros a month and if it exceeds I want to react somehow so the thing that you need to do first of all is either click here on a budget and hit create new budget or more consistently on the left-hand side you'll have budget light in here simply hit add but remember one important thing when you add a budget you add it to the current scope so remember to select the scope based on what you're doing so either create a budget for entire management group that means this budget will be done for all the subscription within this management group or in which case I want to do it only for my one subscription so I'm going to select subscription and hit select so right now I'm adding a budget only for this subscription remember about this because this is very important if you're not gonna change the scope you might have trouble finding your budgets later on and now hit add when you add a budget you need to define a couple of things for instance of course you need to define scope and additionally you can filter a bit if you want to do it and I don't want to do it and right now so I'm gonna remove that now you need to provide a name so 50 your cup I want to be sure all right you need to provide more technical name in this case on no spaces second of all what is the reset of the budget of course you can have monthly quarterly yearly in this case I want to use billing month so I want to be sure that in none of the month I'm gonna exceed 50 euros what's the expiration date so how long is the budget running and what's the budget amount in my case it's 50 euro and as you see if you go down it will show you that if you go by the current forecast most likely you're gonna exceed that budget anyway but I want to create it anyway to show you what will happen when you do it so let's hit next once you create a budget you can actually set up alerts so how do you want to react when this budget is reached for instance by typing 100% here so as you see actually Microsoft tells you that so when the 50 euros spent is reached what do you want to do and to do something you need to define action group because currently we have none to do that simply click manage action groups and add an action group in this case I want to do send email I want to use the same short name maybe here something more specific send email to owner short name is send email and then select the subscription select the research group because action group is a very very small resource so it need to be saved if you're going to select the default research group it's gonna create a default activity log alerts research group in here you need to add an action because as it says it's action group so it can contain multiple actions for instance send email action and what's the action type and this is actually pretty neat feature notice how many things you can actually do because in this case of course I want to send an email but notice that you can actually run other automation run books so PowerShell script so do something in PowerShell when a specific quota on the budget is reached maybe call other function maybe email someone assigned in other management role which is we were gonna use you can register a ticket in ITSM tool you can call a logic app or maybe a web hook in this case I want to email our resource manager owner in which case it allows me to select who shooted me mail I wanted to email for all the owners for the subscription and hit OK this way I don't really have to type by hand because if you would select email here by hand using this email SMS push and voice option you would have to add a specific email to this list so maybe PDL distribution list one of the cool options in this case is of course SMS option so to get a text message if your quota is running an ID or even better I love this option because this allows you if you have other app on your mobile if you select this option and type your email you're going to get a push notification on your phone whenever quota is reached and of course you can leave a voicemail if you want as you see you have quite a few options here and those options are actually not related to the cost management service this is a feature of Archer monitor a wider monitoring service in our room Dominator your application and infrastructure so I'm gonna hit OK which in this case creates that research group treats as this small resource for action group and once it's done it's gonna allow you to select this and as you see we can now select send email to owner action group let's close that lets close this panel and let's go back to budget so in budget in hours when 100% is reached please send an email to owner if you want you can of course maybe do something like this when 70% 75% of the budget is done also send email to an owner one of the cool features of this percentage budget is that for instance when hundred percent is reached maybe call a logic up that will do something right so we can do things like that maybe call a logic app that will stop this virtual machine if I'm gonna exceed my quota and of course then you can simply click create before we click it notice that it added on this diagram the trash holds and those are the trash holds that we just defined 175 and 50 and as you see based on that you know that almost always you will reach this quotient so almost every month gonna get those others let's hit create and after a couple of seconds a budget will be created and you will be able to use it this is the panel where you can review the current budgets remember for the current scope and in here you're gonna see start date and date what is the budget what is the evaluated spend and what is the progress so you can very quickly review it but one additional cool feature is that if you go to cost analysis and review the current month it will show you also the budget so let it give it give it a couple of seconds to load since we created our budget on monthly basis let's change this view to current month and after this chart will now load you will see new information the new information on this chart will be presented and show you the current budget and based on estimates what the current you over use it that you will incur during this month above the budget which in my opinion is pretty cool so what additional features do you have here for instance you also have tags if you go to a juror and start applying resource group tags for instance by going to your other resource group any kind of our research group there's always a tags section here if you're all gonna start applying some tags like I don't know name of the department then you can do analysis based on that and then you can use those in all of those charts in articles management which is pretty cool feature so what else do you have here additionally you have an option for offline analysis so if you use a real cost management and you still feel like there's not enough features for you to do full the real done analysis or maybe bi reporting for your organization then you have additional options for instance you have REST API so you can connect directly to to use api's for instance usage details which gives you full extract of all the data from the users API or maybe query API to get some specific parts of the usage but of course not everyone who wants to use REST API because it's it's not as easy and straightforward if you've never done it before if you do it it's quite easy you just need a service principle proper privileges and you're ready to go so what additional you have you have automated export so you can configure automated export in Azure portal by going to cost management service inside of Cosman Edmund you'll gonna find an export in the settings section you can hit on it again remember about the scope hit add and in here you can already configure your exports one thing that you need to do before you can do it you need to go to your subscription you need to select your current subscription that you're doing the export for and you need to navigate to resource providers here and just type microsoft.com to get the resource provider for cost management just make sure that the cost management exports is activated otherwise you're gonna get an error during the export configuration so let's go back to cost management let's hit on cost management go back to you exports and let's add a new export let's call it demo export let's sect select the export ID to daily of course you can do weekly or you can do some custom based on ten ranges i want daily let's hit next and in this panel you need to select a storage account because what this export functionality does it will drop a csv file into an Asscher blob storage so you need to select one existing or create a new one so let's create a new one like select research group in this case i'm gonna select research group called demo and provide account name so I'm gonna call it AM demo ACM one and I'm going to select location north Europe which is the closest to me container called demo and directory pole path will be called the link exports hit next review all the data and hit create notice that the information there is that the first export will be available in four hours time after a couple of seconds export was created we now have demo export scheduled and this will be done every day and every day you're gonna get a new CSV into that storage account which you can consume from any kind of tool that you need if you don't want to wait a couple of hours simply click on this context menu and select run now to perform the extract right at this very time so you can quickly review the results and once you do it you can actually go back to your portal to your newly created demo research group to the storage account review the container container called demo and inside of the demo you're gonna find the link export folder inside of it you're gonna find a drill down up to that CSV containing your billing information you're gonna hit edit you're gonna find that full information that you see in our report all this is so detailed per day per service per meter and either category that you can actually do your own analysis based on your needs and this is pretty fantastic because now from power bi is very easy to connect to blob storage and pull this information and do some cool analysis yourself but we're not done besides this you have support for our patrols so if someone has an owner contributor or a reader access on the research group they can review cost management details for those particular resource groups or subscriptions additionally if you don't want to give them such a high privileges there are two built-in roles called cost management contributor and cost management Reader allowing you to them to only see and manage billing information which is pretty cool additional features that you get using cons management servers are for instance AWS integration so you can add your AWS information to cost management so you would have one service to get full cost visible even on both clouds additionally you can trigger based on alerts as you've seen you can trigger webhooks logic apps run books and shots etc so you can do automation around billing costs of your subscriptions and other adviser service will also provide recommendation based of cost management data for instance it will recommend you to scale down your virtual machine if it will notice that the usage is small and you're overpaying for your virtual machines which is another pretty cool feature of our cost management and lastly when it comes to support most current subscriptions and most agreements are supporting cost management service whenever it's Enterprise Agreement pay-as-you-go government subscriptions customer agreement options etc etc but with all those cool features there's always some wattles so let's talk about waters first of all remember that forecast requires at least ten days of data so you need to have some use it for in order for order to provide a forecast additionally cos data is only visible after 8 to 12 hours so if you want to react faster to your buildings you're gonna need to craft something custom otherwise if you're fine with 8 to 12 hours on the billing delay you're good to go also remember that up to 48 hours Microsoft has ability to change the buildings to do some adjustment if it calculated your cost in correctly so maybe not do financial reporting for 8 hours delay but some cool cost analysis and cool automations it's good to go additionally most other resources and especially those are around our research managers support tags so use those socks to your advantage but definitely check documentation because not all tags are supported in our cost management after I check the documentation most of the resources that support attacks were visible in our cost management so it's very very few like two or three that I found were not support any cost management and one important note when it to tax is that when you apply attack to resource remember that it will only get reported after that Packer is applied it doesn't more retro actively so if you're gonna apply it on a my fourth only since then cost management service will be reporting and showing that tag and the costs associated with it and lightly reservations were also included in our cost management so if you're gonna purchase a big reservation it's gonna highly impact what you're gonna see in cost management in which case it's good to change from actual to amortized views and then do analysis like this this will actually spread the cost of the reservation over the period that the reservation is purchased for which is good for your automations especially in alerts and lastly if you're using cloud in' and you're wondering should I use cloud in' it's a all tool and it will be deprecated by the end of 2020 so you should definitely plan on moving away from Cloudant to our terkoz management as soon as possible after all of that I hope you see that our cost management is very simple service on the surface but it allows you to extend its functionalities and provide additional benefits to your organization definitely check doc documentation on what else can it do what other features does it hide and definitely keep track of what Microsoft releases because there's gonna be plenty of additional updates for cost management service for today that's it if you liked the video hit thumbs up leave a comment and subscribe if you want to see more then definitely see you next time [Music]
Info
Channel: Adam Marczak - Azure for Everyone
Views: 15,223
Rating: undefined out of 5
Keywords: Azure, Cost, Cost Management, ACM, Billing, Budget, Alert, Monitor, Forecast, Costs
Id: CXFWPI1qk_s
Channel Id: undefined
Length: 28min 23sec (1703 seconds)
Published: Tue May 05 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.