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.

...
<dependency>
  <groupId>ext.grainite</groupId>
  <artifactId>grainite-azure</artifactId>
  <version>{GRAINITE-VERSION}</version>
</dependency>
...

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.

app.yaml
...
tasks:
  - task_name: my_azure_cost_task
    taskClass: ext.grainite.tasks.azure.CostDetailsReportsTask
    taskInstanceClass: ext.grainite.tasks.azure.CostDetailsReportsInstance
    config:
...

Below are the configuration options that can be passed in under config:

Azure is a trademark of Microsoft Corporation.

Last updated