Overview

Information in this article is related to using CloudMonix for monitoring Azure Billing.


The article covers the following topics:

  • common use cases where CloudMonix can help with monitoring and automation

  • what is needed to connect to and monitor Azure Billing

  • what metrics can be tracked, visualized and monitored


Why use CloudMonix for Azure Billing?

Popular usages of CloudMonix include the following examples:

  • Alerting when day-to-day or month-to-month usage increased by a higher than expected amount or percentage

  • Alerting when Azure costs exceed a specified threshold value

  • Automatically pausing or shutting down resources, when costs exceed specified value

  • Tracking and breaking down costs and usage by tag, resource group, resource type or even an individual resource 


Configuration


Azure Billing monitoring can be configured via Setup Wizard or by using the “Add New” button in the dashboard. It required to use Setup Wizard when configuring permissions for the first time. Learn more about authorizing with Setup Wizard here.


It’s required to correctly specify the currently used Offer and Currency, as CloudMonix won’t be able to retrieve information on usage and costs otherwise. It’s also important to specify the correct Billing Day, to ensure the information in Azure Portal and CloudMonix is consistent.


In order to determine used Offer, in the Azure Portal go to the Billing blade, then in the Overview tab navigate to the subscription in question.


Click the subscription name and verify the offer name, offer id, currency used and billing date.



Copy that information to the Azure Billing configuration dialog:



Metrics


Every diagnostic data point that CloudMonix retrieves from the monitored resource is considered a metric in CloudMonix. Refer to the Metrics article to learn more about metrics in general.


The Azure Billing metrics are retrieved using Azure Billing REST API.


CloudMonix provides a default template for monitoring Azure Billing.

The metrics can be added, removed and customized in the Metrics tab in the resource configuration dialog.


Built-in Metrics


CloudMonix will track information on both ARM and Classic resources usage. All Classic (non-ARM) resources are always grouped together into the “Other Resources” category. This is because Azure is not exposing billing details for these resources individually.


AzureBillingTotalPrice

Tracks and visualizes the total cost of Azure usage in the specified billing period.

  • Data Type: double

  • Requires selecting a billing period (e.g. last day, since billing cycle start, previous billing cycle)

  • Included in sample profile: yes, tracked as metrics called DailyCost1DayAgo, DailyCost2DaysAgo, MonthlyCostCurrent and MonthlyCostPrevious

  • Included in default alerts: yes, in alerts:

    • Daily Azure usage increased by more than 20% (Warning): Raises an alert if Azure costs for last day increased by more than 20% over a day before

    • Monthly Azure usage increased by more than 20% (Warning): Raises an alert if Azure costs for current billing period increased by more than 20% over previous billing period


AzureBillingResourcePricesList

Tracks and visualizes a list of prices for all resources.

  • Data Type:  array of objects with the following properties:

  • Name (string): name of the resource, up to 40 characters

  • Price (double): price of the resource 

  • Currency (string): currency symbol

  • ResourceType (string): type of the resource. 

  • Requires selecting a billing period (e.g. last day, since start, previous)

  • Included in sample profile: yes, tracked as metrics called CurrentMonthBreakdownByResource and LastDayBreakdownByResource

  • Included in default alerts: no


AzureBillingResourcesGroupPricesList

Tracks and visualizes a list of prices for all resources aggregated by resource groups.

  • Data Type: array of objects with the following properties:

  • Name (string): name of the resource group, up to 40 characters

  • Price (double): price of the resource group

  • Currency (string): currency symbol

  • Requires selecting a billing period (e.g. last day, since start, previous)

  • Included in sample profile: yes, tracked as a metric called CurrentMonthBreakdownByGroup

  • Included in default alerts: no


AzureBillingTagPricesList

Tracks and visualizes a list of prices for all resources aggregated by tags.

  • Data Type: array of objects with the following properties:

  • Tag (string): name of the tag, up to 40 characters

  • TagValue (string): value of the tag, up to 40 characters

  • Price (double): price of the resources with the given tag

  • Currency (string): currency symbol

  • Requires selecting a billing period (e.g. last day, since start, previous)

  • Optionally can be split by tag values

  • Included in sample profile: no

  • Included in default alerts: no


AzureBillingTypePricesList

Tracks and visualizes list of prices for all resources aggregated by types, e.g. Compute, SQL, Storage.

  • Data Type: array of objects with the following properties:

  • Name (string): name of the resource type, up to 40 characters

  • Price (double): price of the resource type

  • Currency (string): currency symbol

  • Requires selecting a billing period (e.g. last day, since start, previous)

  • Included in sample profile: yes, tracked as a metric called CurrentMonthBreakdownByType

  • Included in default alerts: no


AzureBillingResourcePrice

Tracks and visualizes the price of an individual resource.

  • Data Type: double

  • Requires selecting a resource to track

  • Included in sample profile: no

  • Included in default alerts: no


AzureBillingResourcesGroupPrice

Tracks and visualizes the price of all resources in the given resources group.

  • Data Type: double

  • Requires selecting a group to track

  • Included in sample profile: no

  • Included in default alerts: no


AzureBillingTagPrice

Tracks and visualizes the price of all resources with the specified tag.

  • Data Type: double

  • Requires selecting a tag and tag’s value to track

  • Included in sample profile: no

  • Included in default alerts: no


AzureBillingTypePrice

Tracks and visualizes price of all resources of the given type, e.g. Compute, SQL, Storage.

  • Data Type: double

  • Requires selecting a resource type to track

  • Included in sample profile: no

  • Included in default alerts: no


AzureBillingUsageListByResource

Tracks and visualizes usage list for a resource in the given billing period.

  • Data Type: array of objects with the following properties:

  • Metric (string): Azure metric used to track the usage of the specific resource, e.g. Standard IO – Page Blob/Disk

  • Usage (decimal): usage value

  • Unit (string): usage unit, e.g. GB

  • PriceForUnit (double)

  • Total (double): total cost

  • Currency (string): currency symbol

  • Requires selecting a resource group and a resource

  • Included in sample profile: no

  • Included in default alerts: no


AzureBillingUsageListByResourcesGroup

Tracks and visualizes usages list for the specified resources group in the given billing period.

  • Data Type: array of objects with the following properties:

  • Metric (string): Azure metric used to track the usage of the specific resource, e.g. Standard IO – Page Blob/Disk

  • Usage (decimal): usage value

  • Unit (string): usage unit, e.g. GB

  • PriceForUnit (double)

  • Total (double): total cost

  • Currency (string): currency symbol

  • Requires selecting a resource group

  • Included in sample profile: no

  • Included in default alerts: no


AzureBillingUsageListByTag

Tracks and visualizes usages list for resources with the specified tag in the given billing period.

  • Data Type: array of objects with the following properties:

  • Metric (string): Azure metric used to track the usage of the specific resource, e.g. Standard IO – Page Blob/Disk

  • Usage (decimal): usage value

  • Unit (string): usage unit, e.g. GB

  • PriceForUnit (double)

  • Total (double): total cost

  • Currency (string): currency symbol

  • Requires selecting a tag and tag’s value to track

  • Included in sample profile: 

  • Included in default alerts: 


AzureBillingUsageListByType

Tracks and visualizes usages list for resources of the specified type in the given billing period.

  • Data Type: array of objects with the following properties:

  • Metric (string): Azure metric used to track the usage of the specific resource, e.g. Standard IO – Page Blob/Disk

  • Usage (decimal): usage value

  • Unit (string): usage unit, e.g. GB

  • PriceForUnit (double)

  • Total (double): total cost

  • Currency (string): currency symbol

  • Requires selecting a resource type to track

  • Included in sample profile: no

  • Included in default alerts: no


Alerts


Users can create alerts based on changes in any value tracked by CloudMonix (including custom metrics). Each resource template includes alerts which are suitable for a given resource. The predefined alerts for Azure Billing are listed in the Metrics section. Refer to the Alerts article to learn more about alerts in general.


Alerts are available during the Trial period or in Professional and Ultimate plans only.


Actions

CloudMonix Actions can be used in Azure Billing configuration to perform operations on other Azure resources. For example, certain resources might be paused or shut down when the cost exceeds a specified value.


The available operations will be listed in the Execute Command dropdown, after selecting the target resource from the Execute on dropdown.



Actions are available during the Trial period or in the Ultimate plan only.