in this video I'm going to show you how to set up budgets and alerts in Azure
hello everyone I'm Travis and this is Ciraltos in this video I'm gonna show
you how to set up budgets and alerts in the azure portal I'm also going to
introduce you to tools used to track and trend azure spending as part of cost
management and billing in the azure portal before we get into that please
take a second to subscribe and always remember if at first you don't succeed
skydiving may not be for you the only thing to bring up before getting into
the demo is that not all subscriptions are eligible for cost management I'll
add a link to this page below as you can see most pay as you go Enterprise
Agreement and azure government subscriptions are all eligible cloud
solution provider and pay-as-you-go are not eligible for cost management in this
demo I'm gonna show you how to set up budgets and alerts export usage data and
review cost analysis and see recommendations from azure advisor
okay everyone let's get started with this demo so the first thing I'm gonna
do is go into Azure cost management and to do that I'm just gonna go over here
and we'll do a search cost management and billing let's click on that and
that's exactly what I'm looking for now here you can see I've got three
subscriptions and two of them are disabled and one of them is my primary
one for my home lab or test lab so I also have over here on the left is the
subscriptions I've got invoices where I can view and download to past invoices I
can update my contact information billing address as well as payment
method that's not what I'm gonna be digging into though today you can take a
look at those are pretty self-explanatory
I'm gonna go into cost management here we go so you can see right away my
scope is set to pay-as-you-go which is good because the other two are disabled
and the first thing I'm gonna do is come down to budget and this is my budget so
I have one already on my pay as you go subscription for a hundred dollars and
you can see right now I'm at 27% of that being 27.87 US
dollars I know I'm a big spender although this amount may not be a whole
lot for enterprises it is for me because this is all coming out of my pocket but
I think you'll be able to see how this information is useful if it's a hundred
dollars a thousand or ten thousand so with that I'm gonna create a new budget
by clicking on an add you can assign multiple budgets to a subscription
probably not a whole lot of reason to do that
but for a demo it's pretty convenient so the first thing I'm going to do is type
in a name and I'll do I'm gonna set this one to 200 and notice right away if I
try to put a space in there it won't let me so I'll just do 200Budget and I'm
gonna change any amount to whoa look at that I'm gonna change the amount
200 and billing okay so invoices aren't produced on a
calendar month they're on a billing month I can reset this amount by month
quarter or year in my cases this is gonna be $200 per invoice month I could
also make it 600 for billing quarter or I can move on to whatever my set billing
year amount is I can also do that by calendar month if I didn't want invoice
month but I'm just gonna leave this at billing month so we'll leave that there
and the expiration date so this budget will expire at some point in the future
let's go 22 and down here I'm gonna set some alert conditions because I've got
it set to $200 now and I may want to know when I'm starting to approach that
or how be able to track my progress over the month of how my spends going so the
first thing I'm gonna do is put a budget amount of 75 percent that's gonna be 150
dollars if you have an azure alert action group setup you can select it I
do have a couple but those are for something else I'm we're just gonna
leave that blank and I'm gonna come over here I'm gonna add a second budget
amount of well let's just go down and put in an email address so quits yelling
at me I'm going to put in my personal email
okay so now I'm gonna come back up here now that I got rid of all that red and
I'm gonna go to 90 so that's $180 so at 75% or 150 dollars
and at 90% or a hundred and eighty I'm gonna get an alert and you can put in
multiple recipients if you need to for that alert so now I'm gonna hit well
let's go down and see nothing else down there now I'm gonna hit crate and there
is my budget my two hundred dollar budget is at half of my one hundred
dollar budget which really makes a lot of sense okay so the next thing I'm
going to do is go to cost alerts and it's really blurry so the reason why is
because I have a handy masking tool on let me just turn that off and this is
showing past alert so over the last 30 days I've had one alert when I hit 80%
on my pay as you go so that is what an alert looks like so you can go in here
to see any outstanding alerts that you have next I'm going to go into cost
analysis the default view for cost analysis is going to give a projection
of your budget and when it thinks you're gonna hit or exceed that budget and you
can see here around July 21st it's telling me I'm gonna start to exceed my
budget at my current spend rate now I don't know if you can see this very well
but over here around July 7th it started to flatline so I'm gonna change this to
let's say daily and I'm gonna regroup by resource type and I'm gonna change this
from a column to area let's just change this date as well I want to do the past
30 days there we go okay so what's happening here is
remember I flatlined see this big green chunk here so we got to figure out what
that is because that's what was costing me a lot more than normal
and if I go down here we have the different color codes but I'm having a
hard time distinguishing which one is which so you can simply shut them off
while I knew it wouldn't be forecast costs but okay so there it is
so I turned that off I can see it removes
that amount from the total and that is for bastion host so I had a little bit
of a spend outside of the ordinary because of the last video I did which
was on Azure Bastion and that cost me I think it was about six bucks total oh
nine dollars here it is here you can see we have some donut charts with service
name location and resource group name so these are really handy it's just another
breakdown of the same date range so I want to do a change up the view a little
bit I'm gonna go past 12 months and I'm gonna change it to monthly and here you
can see I had quite a peak here around December if we click on disks we can see
that that goes away so it was disks that were causing all the higher expense
somebody had posted a comment that they wanted to see more real-world examples
and this is definitely a real-world example so I was doing some virtual
machine arm template deployments and I changed
the disc type from standard to managed disks and I was also doing multiple
servers with multiple data discs and what I found out is those are built at a
set rate not as a consumption based rate and that accumulated a lot faster than I
had planned January is when I learned about that and I decided to put alerts
on my budget so that is definitely a real-world example I guess that was my
Christmas present to myself so there's a lot of options on how you
can view this data by location by billing period resources resource group
name tags you're using tags which is a good idea you can break it down here
that becomes really helpful the next thing I'm gonna do is export
the data so when I click export at the top I can either download it as Excel or
CSV I'm gonna leave it as Excel and will download that data and I can open it up
in Excel now and here I'll just do this so now we have the usage date resource
type service name and pre-tax cost so you can pull this into any other tool
that you may want to use and start to slice and dice that and do some
analytics on it another option and something I did
the previous video was to send the azure spend information into log analytics
then I use Grafana which is an open source data visualization program to
pull that data in from log analytics and track it visually from Grafana
so that's another option if you're interested in that I'll include a link
to that up above the last thing I'm going to go over is advisor
recommendations now I don't have a lot here I do have one now it says that I
could buy a reserved instance and save 268 dollars if you have a larger
environment you'll surely see a lot more of these but basically a reserved
instance means you pay in advance for the time we're gonna use advisor
recommendations are gonna give you hints on how to save money which is a good
deal you should definitely go in and look at that so that's it that's how to
setup budget and set up alerts on your budget view cost alerts analyze and
export data and view advisor recommendations it's as easy as that now
you have no reasons to be surprised when the azure bill comes please don't forget
to subscribe and thanks for watching
you