Showing posts with label cost. Show all posts
Showing posts with label cost. Show all posts

Thursday, February 1, 2018

How to have an easy report on your Azure consumption ? with an Azure EA

Many times I got asked to tell where to get the API Key to perform your self cost reporting, using Cloudyn, or PowerBI, or your own Code using Web API.

Very easy !

(this post is a update simplified from this one : http://blog.thavo.com/2016/10/cost-on-azure-where-to-start.html)

AZURE ENTERPRISE AGREEMENT PORTAL

1. go to https://ea.azure.com
image

2. Move from “Manage” to “Report”

image

3. Choose “Download Usage” > “API Access Key”

image

image


The API Key should look something like :

image

POWER BI WEB APP

Go to PowerBI : https://powerbi.microsoft.com

image

image image


Fill in the questions and the API Key, then it works straight after


image

Sunday, October 9, 2016

Cost on Azure : Where to start with Billing API ? [Part 1]

Do you remember this nice CSV file, that you have to process ??
image
  • AccountOwnerId,
  • "Account Name",
  • "ServiceAdministratorId",
  • "SubscriptionId",
  • "SubscriptionGuid",
  • "Subscription Name",
  • "Date",
  • "Month",
  • "Day",
  • "Year",
  • "Product",
  • "Meter ID",
  • "Meter Category",
  • "Meter Sub-Category",
  • "Meter Region",
  • "Meter Name",
  • "Consumed Quantity",
  • "ResourceRate",
  • "ExtendedCost","Resource Location",
  • "Consumed Service",
  • "Instance ID",
  • "ServiceInfo1",
  • "ServiceInfo2",
  • "AdditionalInfo",
  • "Tags",
  • "Store Service Identifier",
  • "Department Name",
  • "Cost Center",
  • "Unit Of Measure",
  • "Resource Group",

This post presents how to have complementary information on your Azure billing and cost prediction at the end of the month.
Microsoft Azure has opened its Billing API for a few years, so we could query it and perform various calculations. Since the EA portal (Enterprise Agreement) has been re-organized, I wanted to show how to get the necessary information.

Here is the new portal : https://ea.azure.com/
image

PRE-REQUISITE

Work with the person in charge of the Enterprise Agreement. This person must have the Enterprise Account Role of “Enterprise Administrator” (usually the super-Admin or the CFO that has purchased Azure).
To find out who he is or to your understand the Enterprise Account Roles, go to http://blog.thavo.com/2014/05/where-to-start-with-microsoft-azure.html 
To help you estimate, you have a public Microsoft tool, although depricated, it could spare you many hours: http://aka.ms/azurecosttool

STEP 1: GETTING THE API ACCESS KEY

Once logged in, go to Reports : https://ea.azure.com/report/usagesummary
and “Download Usage”
image
which brings you to the page : https://ea.azure.com/report/downloadusage
clip_image002
On the far top-right menu, click on “API Access Key”, then you will have access to the Primary Key, that has an expiration date (important to remember particularly if you plug in a SaaS application).
If the Key has not yet been generated, please do so:
image
and confirm”Yes”
image
Then use the Primary Key (that has an expiry date)
image

STEP 2: DECLARE YOUR AZURE PARTNER (ACCREDITED BY MICROSOFT)

For companies using Microsoft Azure, when applicable under conditions of being a very closed partner with Microsoft, you could activate benefits when you declare your “DPOR” Microsoft partner, Digital Partner of Reference.
Illustration :
Let us assume that the DPOR is VISEO of ID=3398971 and that you are using the old Azure portal https://manage.windowsazure.com/ (easier to illustrate):
https://portal.azure.com/#blade/Microsoft_Azure_Billing/managementpartnerblade?ID=3398971

CAUTION : * You must be the owner of the subscription, i.e. the Enterprise Account Role “Account Owner”
* Microsoft is performing a rework to better improve the Billing on the Enterprise Agreement portal. These steps might not work in the near future


1. Log in to the portal
2. Click on your name/email
3. Click “View my bill”
SNAGHTML17ecfe5a
4. It will redirect to another portal called “Azure Account Center" (sometimes it takes a few minutes, for secured login using Single Sign On) : https://account.windowsazure.com/Subscriptions
5. Choose your subscription
6. Select “Partner information”, then fill in the number 3398971. When you click “Check ID” Azure finds the corresponding DPOR.
https://portal.azure.com/#blade/Microsoft_Azure_Billing/managementpartnerblade?ID=3398971
image
It will send an email to your DPOR (provided you have a subscription that has an explicit naming convention).

STEP 3: ACTIVATE YOUR BENEFITS

If you are entitled, you can ask for the benefits, such as discounts on Teevity Cloud Usage Analytics tools: http://www.teevity.com/

Insert the information, based on the previous EA portal,
image

Once DONE, you could access :

Cost per day:
- This type of data visualization is very valuable. For instance, it could be a challenge to understand when occurs various consumuption. For instance when does our Visual Studio Pro licenses occurs ? In the graph below, the patterns is obvious : it happens at the beginning of the month. To be honnest, I though that each VS Pro licences had it’s own 1 month date of anniversary for billing. At the scale of 1000 licences, small optimization can have a major impact !
image

You can have the cost history
image

You will receive email notifications of the prediction of consumption at the end of the month:
image

MORE INFORMATION

For Transferring ownership of an Azure subscription : https://azure.microsoft.com/en-us/documentation/articles/billing-subscription-transfer/