how to find ServiceName in Azure Cloud billing export - azure

In Azure Cost analysis console, we have the option to filter by Service Name. The same Column is NOT there in the billing CSV export I’m getting from Azure. Does anyone know how to filter Service name in billing export

I tried to see cost analysis in 'Cost Management + Billing | Billing account' menu, and I also found the downloaded CSV files don't contain an Service Name column. So I prefer to use cost management api to get the details.
Here's the api link: https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage
By the way, I remembered that if someone wanna use this api, please make sure that the target subscription has joined Azure plan.
Hope it will do some help. Wish you a good day.

Related

How to get cost of Azure subscription programmatically

Trying to understand the different Azure APIs to get the Azure subscription cost details programmatically.
I see RateCard API is good approach. In the output/response of this API , there is something called meterID and meterDetails.
anyone know what is this meterID and meterDetails ? how to get it using Azure Portal ?
The meterID is a GUID for every resource except VMs. meterDetails is the detailed Usage. You can get these details from the cost management section in Azure portal

Get monthly Azure billing invoice of Resource Group usage via email

I want to get the monthly billing invoice of my Azure Resource Group usage sent to my mail instead of downloading it manually from the portal.
This can be possible at subscription level but can this be achieved at Resource group level?
Any ideas please?
You can opt for this option,
To opt in, select your subscription from the Subscriptions blade. You have to opt in for each subscription you own. Select Send my invoice (you might not see this if you're not the account admin), and then select Opt In.
However the bill wont be at the resource group level details
After a lot of research and help from Stack Overflow, I was able to achieve the requirement as mentioned in the question.
You have two options:-
Use the Schedule Export feature in Azure Cost Management.
Use the Azure Cost Management API to create export.
Once you've added scheduled the export, your invoice will be stored in your storage account. (You will need to add the storage account details in the export configuration)
I have used an Azure logic app to pick up the invoice file contents from my storage account and then send it via mail.
Check my post for further clarification -->
Dynamically send blobs from azure storage account to email using azure logic apps

Azure Subscription - Twitter sentiment analysis

So we have twitter sentiment analysis been set up using Power Automate+ Power BI + Twitter dev API. Everything was working fine till this month start. However suddenly we started getting the below error Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource" . On futher investigation found out that my Azure subcription is disabled.(free account). However the free account was set up only 2 months ago.
Questions -
How did the Subcription got disabled within 2 months.
I read few articles is it true the free azure benfits can be availed for the subcriptions which are in US West Central?
If #2 is true , there a way wherein we can change the location of the subcription to US west Central.
What would be the solution for this issue?
Your free subsctiption has quotas and probably you ran out of credits. You just need to switch to pay as you go subscription mode (with your credit card) and the solution should work again. For more information about the quotas, please read the following:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits

Transfer SQL Azure servers, Storage Accounts away from CSP subscription

We have a CSP subscription through a partner, and the whole experience is rubbish. Costing / billing APIs not available, can't use our Office 365 Azure AD, can't use SendGrid, can't see the cost of resources in the portal, loads of features missing. It's rubbish.
We're moving away and want to transfer a substantial number of SQL Azure servers (with many pools and databases) and Storage Accounts (with lots of items) to another, new PAYG subscription, which uses our O365 Azure AD.
#AzureSupport on Twitter pointed me to - https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-move-resources
But this says, "The source and destination subscriptions must exist within the same Azure Active Directory tenant."
It suggests two ways forward:
https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-subscriptions-associated-directory
But... The "Change Directory" option is not present for CSP accounts (lo and behold! another missing feature)
https://learn.microsoft.com/en-us/azure/billing/billing-subscription-transfer
But.. Heading to https://account.windowsazure.com/Subscriptions as instructed gives me a 500 error, with "We are sorry, but we could not complete that operation.".
Also.. Of course, the CSP (Ingram) do not offer any of these kinds of options on their sub management portal.
#AzureSupport then recommended I post here.
Can anyone advise / help please? Would be very much appreciated, thank you.
You are currently blocked, as there is not a good workflow to migrate from CSP to Pay-as-you-go, as the below User Voice entry suggests others are looking for the same. Please up vote and comment on this.
Change subscription from CSP to pay-as-you-go
As for getting switched back to PAYG, I suggest exporting your data and importing in to new services that have been set-up under your desired account set-up. If you need the instance names, these will need to be deleted before the data can be imported into the newly created service with the existing instance names, in cases where instances names can be reused after deletion of the particular service.
There is currently no supported means to migrate a subscription away from CSP once migrated, from my investigation.
Use Azure Data Migration Service to migrate from source to target. This though, will not allow you to keep the same instance names, as both the source and target will need to exist at the same time.

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