How to see detailed cost breakdown for Azure subscription - azure

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

Related

alert on azure cost before budget has been reached

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:

Azure Dashboard to show only service health

Right now I'm limited to using only Azure dashboards for reporting on resources. A dashboard I need to create is one where only the resource health of my resources is displayed the way it is displayed by going to Dashboard->Monitor->Service Health. I need to be able to choose only my resource types and have them display in a nice list with a green arrow for up and that red X for down. Is this possible to do from inside the portal? It's imperative that those that use the dashboard do not have to click anything to see the healthy/unhealthy status. I basically need the list below, but for all of my resources, not just AKS.
Thanks!
I actually found the answer, it's in preview. Create a workbook and add a query. In the query, choose "Azure Health (preview)", for the resource type choose "Subscription" and BOOM!, there it is. This was easier than I thought, I just had to do some heavy digging. I hope this helps other people trying to do this. Oh, and I pinned this to a dashboard and everyone was thrilled.
Interesting ask indeed. AFAIK, pinning Azure Resource Health filtered by resource type to the Azure Dashboard is not supported as of today. Also, I noticed that the pin icon atop the page only creates a shortcut to Azure Service issues but not to the Resource Health blade.
You can submit your suggestion to the Azure Service Health Product Group through their feedback forum, or upvote this similar idea.

How to get hollistic view of Azure environment

There's an awful lot of disjointed documentation on monitoring network/resources in Azure. What I'm looking for is which pieces are needed to get information from VMs, NVA firewalls, azure load balancers, and other network resources and network connectivity into a single pain of glass in Azure. Only concerned about Azure, not on-prem for now.
I've come across azure monitor, log analytics work spaces, event hub, vm extensions, network watcher, insights, etc...but I'm not sure which are required and which are not. One doc leads to the next and I end up with 30 tabs open. I'll also need to be able to push logs to other security devices such as a SIEM.
Does anyone know of a deployment guide that wraps this all up in a more logical fashion? Does anyone have any feedback on which pieces from azure (not 3rd parties) are required at a minimum to accomplish a single pane of glass to view my Azure environment holistically?
General overview of observability in Azure
Likely, the thing you're looking for is Azure Monitor. It's an umbrella term for everything observability related inside Azure.
To store Metrics and Logs you need Log Analytics: it can query data with kusto query language, visualize results, define Alerts on queries.
Alerts is quite a complex beast, as it is spread across the entire cloud. Two types that I use the most:
log-analytics alert (which I mentioned above)
Alerts tab, which is available at every Azure component view. for example, open resource group, and scroll down to Monitoring section
Each component also has a subset of built-in metrics. Likely, you noticed that many azure components on the Overview view display some charts. For example, Azure Storage Account displays Total egress, Total ingress, and other line-charts. When you click on these charts you can customize them. These metrics and charts are free to use.
Microsoft also has all-in-one observability solution for Azure Functions and Web Apps: Application Insights
Dashboards allows to join multiple charts into a single view and share it with others.
If you care about security, Azure proposes Azure Security Center
Deployment/management strategy
I suggest to start with:
Create Log Analytics Workspace, which is the storage for metrics and logs. The azure docs article explains how to design it: how many instances to use, how to rate-limit ingestion (it might be expensive if goes out of control), how to access it and so on.
To get Azure components logs, look for Diagnostic Settings tab at a component page at Azure portal, but not all components has it (sic!). I suggest
sending the most critical data to Log Analytics workspace to store them in a queryable format for 30 days (it's in free tier). This is needed for investigating current issues with your infrastructure
if you might need logs later than 30 days - send them to Storage Account
you mentioned SIEM integration - route required events to Event Hub and then process the stream according to your requirements
So, if you need long-term storage - you need to create Azure Storage Account.
If you need real-time analysis - you need to build a pipeline based on Azure Event Hub.
If you have Azure Functions and Web Apps - add Application Insights. According to my experience, I would suggest starting with a separate instance per each Azure Function resource or Service.
Create Alerts for each component separately. If you do it through UI - open component page at the portal and look for Alerts tab there. If you're automating the process (please do so as soon as possible), do not expect easy trip: I used ARM templates and terraform - in both cases, there are dozens of barely documented features.
Join related components core-metrics into Dashboards and share it with the team. This guide is a good starting point. Note, when you share the dashboard, it's also persisted as an azure resource in the subscription.

best options for a detailed azure invoice?

I need to provide a detailed invoice for Azure usage to a client. I'd like to be able to provide as granular of a breakdown as possible. For example, if an Azure cost of $10 was accrued for an App Service on one day, then I'd like to be able to provide the info on why that was, if that info is available. Was the cost due to a distributed allocation of a monthly cost? Was the cost due to a specific measure of ingress/egress? etc. This is my first time trying to provide a detailed invoice like this, so I'm sure that there are others here who have had the need to do this before who can probably provide some valuable insight on this.
You can see the cost breakdown under Cost Management in Azure Portal
In the Azure portal, navigate to cost analysis for your scope. For example: Cost Management + Billing > Cost Management > Cost analysis.
Select Cost by resource.
Change the view to Table.

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.

Resources