Azure Billing Monitoring

Last updated on 02 November, 2021

You can monitor Azure billing data using LogicMonitor. LogicMonitor uses Azure Usage, Rate Card, and Cost Management APIs to calculate an estimate for your Azure spend, enabling you to monitor spending over time from the LogicMonitor platform.

You can use the following DataSources to monitoring Azure billing data by Azure Usage and Rate Card:

  • Microsoft_Azure_BillingCostBySubscription—Monitors cost per subscription for which billing data is accessible.
  • Microsoft_Azure_BillingCostByRegion—Automatically discovers Azure regions and monitors spend per discovered region.
  • Microsoft_Azure_BillingCostByService—Automatically discovers Azure services and monitors spend per discovered service.
  • Microsoft_Azure_BillingCostByOperation—Automatically discovers Azure line item operations and monitors spend per operation.
  • Microsoft_Azure_BillingCostByTag_Example—Monitors cost by tag value, where tag key needs to be provided in the DataSource AD section.

You can use the following DataSources to monitor Azure billing data by Cost Management:

  • Microsoft_Azure_CostManagementBySubscription—Monitors the cumulative pre-tax cost by subscription ID for the current month to date.
  • Microsoft_Azure_CostManagementByRegion—Monitors the cumulative pre-tax cost by region and subscription for the current month to date.
  • Microsoft_Azure_CostManagementByService—Monitors the cumulative pre-tax cost by service and subscription for the current month to date.

Requirements

To monitor your Azure billing data in LogicMonitor, you must navigate to Subscriptions in your Azure portal and copy the Subscription ID, Offer, ID, and Billing Start Date. You will need to enter this information into LogicMonitor.

Monitoring Azure Billing Data

  1. Locate your Azure account in the Resources tree and navigate to the Billing tab.
  2. Enter the Subscription ID, Offer ID, and Start Day of Billing Cycle in LogicMonitor to monitor your billing data based on Azure Usage and Rate Card.
  3. Enter the Subscription ID to monitor your billing data based on Azure Cost Management.

Note: If you are monitoring an EA or CSP partner subscription, you must take steps in your Azure portal to ensure that LogicMonitor has the correct permissions to pull data from the Cost Management API. For more information, see Assign management group scope access or Enable cost management for customer tenant subscriptions from Microsoft’s documentation website.

  1. Import the Azure Billing DataSources. You should see Cost by subscription, region, service, and operation (Rate Card only) DataSources appear under the account level device. For instructions, see Importing LogicModules.

Note: It may take 15-30 minutes before the DataSources appear and data collection starts.

To configure the Microsoft_Azure_BillingCostByTag DataSource to monitor cost based on a tag in your Azure account, add the tag key in the AD Parameters section of the DataSource. For example, the following DataSource discovers all values of the tag key ‘environment’ and tracks the cost associated with each:

Configuring Country and Currency

The country or region associated with your Azure billing information can be configured with the property azure.country. The value of this property also adjusts the billing currency for the account. By default, the property is set to “USA”.

  1. Locate your Azure account in the Resources tree and navigate to the Billing tab.
  2. Click Manage.
  3. Navigate to “Basic Information”, edit the property: azure.country, and assign a value.
  4. Click Save.
In This Article