Azure Extension
The Azure extension enables pulling cost data from Azure Cost Management in Grainite applications.
Setup
In order to be able to use the Azure extension, first include it as a dependency in your application's pom.xml
file.
Replace {GRAINITE-VERSION}
with the version of Grainite you are also using for libgrainite (the Grainite Client library for Java).
Contents
The Azure Extension includes:
CostDetailsReportTask
: Task that continuously polls Azure Cost Management to get cost details for various resources.
CostDetailsReportsTask
Usage
To include this task in your application, you must specify the taskClass ext.grainite.tasks.azure.CostDetailsReportsTask
and taskInstanceClass ext.grainite.tasks.azure.CostDetailsReportsInstance
in your application's configuration YAML file.
Below are the configuration options that can be passed in under config
:
Property | Required? | Value | Description |
---|---|---|---|
| REQUIRED | Example: | Azure Subscription ID to query |
| REQUIRED | Example: | Azure Tenant ID to query |
| REQUIRED | Example: | Azure Client ID to use (obtained with a service principal) |
| REQUIRED | Example: | Azure Client Secret to use |
| Optional | Example: | Number of days in the past to poll the data for. Azure allows a max of 30. |
| Optional | Default: | Comma-separated list of fields in the payload that form the (compound) key for the event to be emitted. |
| Optional | Example: | Grainite topic to emit output of this task to |
| Optional | Example: | Grainite table to emit output of this task to via Grain message ( |
| Optional | Example: | Given action to invoke via Grain Message to the table specified in |
Azure is a trademark of Microsoft Corporation.
Last updated