Azure Stack
This article describes how to report Azure Stack consumption with Exivity
Introduction
When deploying the Azure Stack Extraction template for Exivity, some configuration is required within your Azure Stack environment and a lookup file needs to be created. The following process must be completed in order to report on Azure Stack consumption:
Create an Exivity Enterprise Application in your Azure AD for authentication
Configure a rate card lookup file
Configure an Extractor
Configure a Transformer
Create your Report
Creating an Enterprise Application
For Exivity to authenticate with Azure Stack, you will need to create an application in the Azure AD where you have registered your Azure Stack management node:
Make sure to write down the Application ID and its corresponding Secret, since you will need these when configuring the Extractor later.
When you create this application in your Azure AD make sure it has (at least) the Reader Role in your Default Provider Subscription:
Create a rate card
As Microsoft does not provide rate card information via the Azure Stack Consumption API you will only obtain usage metrics from Azure Stack for all of the Meter IDs that are mentioned here by Microsoft.
Exivity provides a template rate card that you can use for creating your own rates. Please bear in mind that these rates are fictional, thus you should update it with your preferred values. However to get started, you can use the file linked above by placing it as a csv file in your Exivity home folder at the following location:
%EXIVITY_HOME_PATH%\system\extracted\AzureStack\rates\azure_stack_example_rates.csv
Once loaded into the system using a Transformer you will be able to change the rates easily through the GUI. This will also enable you to test any draft rates.
Configure Extractor
To create the Extractor, browse to Data Sources > Extractors in the Exivity GUI and click the Create Extractor button. This will try to connect to the Exivity Github account to obtain a list of available templates. For Azure Stack:
Pick Azure_Stack_Extractor_(App+Secret) from the list
Provide a name for the Extractor in the name field
Click the Create button.
Once you've created the Extractor, go to first tab: Variables
Fill in all required variables marked within the red box in above screenshot. If you don't know some of the required GUIDs, most of these can be obtained by browsing to the Azure Stack management node URL:
https://adminmanagement.**<your.domain.com>**/metadata/endpoints?api-version=2015-01-01
Another way to obtain some of this information is using the Diagnostics button in your management portal:
When you click the Show Diagnostics link, it should download a JSON file containing most of the parameters you'll need, such as Provider GUID, Audience GUID etc.
Once you've filled in all details, go to the Run tab to execute the Extractor for a single day:
The Extractor requires two parameters in yyyyMMdd format:
from_date is the date for which you wish to collect consumption data
to_date should be the date immediately following from_date
These should be specified as shown in the screenshot above, separated with a space.
When you click the Run Now button, you should get a successful result.
Configure Transformer
Once you have successfully run your Azure Stack Extractor, you can create a Transformer template via Data Sources > Transformers in the Exivity GUI. Browse to this location and click the Create Transformer button. Make any changes that you feel necessary and then select the run tab to execute it for a single day as a test.
Make sure that when running the Transformer you select custom range in the drop-down menu labelled Run for and select the same day as for which you have extracted consumption data in the previous step.
Create a Report
Once you have run both your Extractor and Transformer successfully create a Report Definition via the menu option Reports > Definitions:
Select the column(s) by which you would like to break down the costs. Once you have created the report, you should then click the Prepare Report button after first making sure you have selected a valid date range from the date selector shown when preparing the report.
Once this is done you should be able to run any of Accounts, Instances, Services or Invoices report types located under the Report menu for the date range you prepared the report for.
Last updated