Microsoft Azure - Cost and Usage Extractor
Prerequisites
To configure the ETL, you need some parameter values about your Microsoft Azure subscriptions. The ETL uses these values to connect to the Azure cloud for extracting the billing and usage data of your Azure resources.
Complete the prerequisite steps given in the following tables to obtain these details.
Prerequisites to collect data from the Pay-As-You-Go Azure subscriptions
Prerequisites to collect data from the EA Azure subscriptions
Additionally, ensure that the following requirements are met:
- The Microsoft Azure - Azure API extractor is already configured to extract the metrics and relationships of Azure resources.
- If you want to view business service data in the Truesight Cloud Cost Control UI, configure the Microsoft Azure - Azure API extractor to collect tagging related data. After the ETL runs, the Workspace displays a hierarchy of business service entities and related resources. The Business Service Tag Key that is used in the Azure portal to tag the business services is used in this ETL to organize the cost and usage data as per the business services.
To configure the ETL module
To integrate TrueSight Capacity Optimization with the extractor, complete the following steps:
- In the TrueSight Capacity Optimization console, navigate to Administration > ETL & SYSTEM TASKS > ETL tasks.
- In the ETL tasks page, under the Last run tab, click Add > Add ETL.
The Add ETL page is displayed. In the Run configuration tab, for the ETL module property, select Microsoft Azure - Cost and Usage Extractor.
Specify values for the properties under each expandable tab. For details about the common properties, see ETL-common-configuration-properties.- In the Entity catalog tab, ensure that you select the same entity catalog that is used by the Microsoft-Azure-Azure-API-Extractor ETL module.
In the Microsoft Azure configuration tab, specify values for the following properties:
The [confluence_table-plus] macro is a standalone macro and it cannot be used inline.
- Click Save.
You return to the Last run tab under the ETL tasks page. - In simulation mode, validate the results: In the ETL tasks table under ETL tasks > Last run, locate your ETL (ETL task name), click Run
to run the ETL.
After you run the ETL, the Last exit column in the ETL tasks table will display one of the following values:- OK: The ETL executed without any error in simulation mode.
- WARNING: The ETL execution returned some warnings in simulation mode. Check the ETL log.
- ERROR: The ETL execution returned errors and was unsuccessful. Edit the active Run configuration and try again.
- After you verify that the ETL is running correctly, switch the ETL to production mode:
- In the ETL tasks table under ETL tasks > Last run, click the ETL name under the Name column.
- In the Run configurations table in the ETL details page, click Edit
to edit the active run configuration.
- In the Edit run configuration page, navigate to the Run configuration expandable tab and set Execute in simulation mode to No.
- Click Save.
- Locate the ETL in the ETL tasks table and either schedule an ETL run or click Run
to run it now.
After you run the ETL, or schedule the ETL for a run, it will extract the data from the source and transfer it to the TrueSight Capacity Optimization database.
API calls for the Pay-As-You-Go Azure subscriptions
The ETL makes the following calls to the Azure Billing REST API to retrieve data from your Pay-As-You-Go Azure subscriptions.
Task | Resource Management API call |
---|---|
Authentication | POST https://login.windows.net/<tenant_id>/oauth2/token (Application ID, Authentication key) |
List all subscription details | |
Get resource rate card | GET https://management.azure.com/subscriptions/<Subscription_ID>/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId eq 'Offer Code' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US'
|
Get resource usage | GET https://management.azure.com/subscriptions/<Subscription ID>/providers/Microsoft.Commerce/UsageAggregates?api-version=2015-06-01-preview&reportedStartTime=<Reported start date>&reportedEndTime=<Reported end date>&aggregationGranularity=Daily |
Get consumption data for enrollment number |
API calls for the EA Azure subscriptions
The ETL makes the following call to the Azure consumption REST API to retrieve data from your EA subscriptions.
Task | Resource Management API call |
---|---|
Get consumption data for enrollment number |
For more information, see the Microsoft Azure Billing API Documentation.