選択した Datadog サイト () では Cloud Cost Management はサポートされていません。

概要

To use Azure Cloud Cost Management in Datadog, you must set up the Datadog Azure integration and set up amortized and actual exports in Azure. Additionally, Datadog must have permissions to read the exports from the container.

Datadog provides cost visibility on a Subscription, Resource Group, and Billing Account Level. Microsoft Customer Agreements (MCA) can only set up at the Subscription level. Pay as you go (PAYG) and CSP accounts are not supported.

セットアップ

:

  • If you are using Datadog’s US3 site, you may have set up the Datadog Azure Native integration using the recommended Datadog Resource method through the Azure Portal. To support Cloud Cost Management, you need to create an App Registration.
  • Microsoft Customer Agreement のエクスポートは、サブスクリプションレベルで構成する必要があります。Enterprise プランの場合は、すべてのサブスクリプションにオンボードするように請求アカウントを構成できます。
  • 従量課金制のアカウントには対応していません。

Configure the Azure integration

Navigate to Setup & Configuration and select an Azure account from the menu to pull costs from. If you do not see your Azure account in the list, view your Azure integration to add your account.

コストエクスポートの生成

You need to generate exports for two data types: actual and amortized. Datadog recommends using the same storage container for both exports.

  1. Azure ポータルの Cost Management + Billing の下にある Exports に移動します。

  2. エクスポートのスコープを選択します。注: スコープは billing accountsubscription または resource group でなければなりません。

  3. スコープを選択したら、Add をクリックします。

    In Azure portal highlighting Exports option in navigation and the export scope

    The improved exports experience is in Preview and may not be available for all customers.

    1. 次のエクスポートの詳細を選択します。

      • Metric: Actual Cost (usage and purchases) THEN Amortized Cost (usage and purchases)
      • Export type: Daily export of month-to-date costs
      • File Partitioning: On
      Export details with Metric: Actual, Export type: Daily, and File Partitioning: On
    2. Choose a storage account, container, and directory for the exports.

      • Note: Do not use special characters like . in these fields.
      • Note: Billing exports can be stored in any subscription. If you are creating exports for multiple subscriptions, Datadog recommends storing them in the same storage account. Export names must be unique.
    3. Create を選択します。

    1. 次のエクスポートの詳細を選択します。

      • Metric: Actual Cost (usage and purchases) THEN Amortized Cost (usage and purchases)
      • Frequency: Daily export of month-to-date costs
      • Dataset version:
        • Supported versions: 2021-10-01, 2021-01-01, 2020-01-01
        • Unsupported versions: 2019-10-01
      Export details with Metric: Actual, Export type: Daily, and Dataset Version
    2. In the destination tab, select the following details:

      • Choose a storage account, container, and directory for the exports.
        • Note: Do not use special characters like . in these fields.
        • Note: Billing exports can be stored in any subscription. If you are creating exports for multiple subscriptions, Datadog recommends storing them in the same storage account. Export names must be unique.
      • File partitioning: Checked
      • Overwrite Data: Unchecked
      Export Destination with File partitioning and Overwrite data settings
    3. Click Next and Review + Create.

For faster processing, generate the first exports manually by clicking Run Now.

Click Run Now button in export side panel to generate exports

Datadog がエクスポートにアクセスできるようにする

Note: For Microsoft Customer Agreement, set up at the subscription level.

  1. Exports タブで、エクスポートの Storage Account をクリックし、移動します。
  2. Containers タブをクリックします。
  3. 請求書の入っているストレージコンテナを選びます。
  4. Access Control (IAM) タブを選択し、Add をクリックします。
  5. Add role assignment を選択します。
  6. Storage Blob Data Reader を選択し、Next をクリックします。
  7. これらの権限を、Datadog と接続した App Registration のいずれかに割り当てます。
    • Select members をクリックし、App Registration の名前を選んで、Select をクリックします。
    • review + assign を選択します。

If your exports are in different storage containers, repeat steps one to seven for the other storage container.

  1. Exports タブで、エクスポートの Storage Account をクリックし、移動します。
  2. Containers タブをクリックします。
  3. 請求書の入っているストレージコンテナを選びます。
  4. Access Control (IAM) タブを選択し、Add をクリックします。
  5. Add role assignment を選択します。
  6. Storage Blob Data Reader を選択し、Next をクリックします。
  7. これらの権限を、Datadog と接続した App Registration のいずれかに割り当てます。
    • Select members をクリックし、App Registration の名前を選んで、Select をクリックします。
    • review + assign を選択します。

エクスポートが別のコンテナに入っている場合は、他のコンテナについて手順 1〜7 を繰り返します。

コストマネジメントリーダーへのアクセス構成

注: スコープが Billing Account の場合、このアクセスは構成する必要はありません。

  1. Navigate to your subscriptions and click your subscription’s name.
  2. Access Control (IAM) タブを選択します。
  3. Add をクリックし、次に Add role assignment をクリックします。
  4. Cost Management Reader を選択し、Next をクリックします。
  5. Assign these permissions to the app registration.

This ensures complete cost accuracy by allowing periodic cost calculations against Microsoft Cost Management.

Datadog でクラウドコストを構成する

Navigate to Setup & Configuration and follow the steps.

コストタイプ

インジェストしたデータは、以下のコストタイプで視覚化することができます。

コストタイプ説明
azure.cost.amortized適用される割引率に基づくコストと、割引期間中の使用量に応じたプリペイドの配分 (発生主義)。
azure.cost.actualコストは、使用時に請求される金額で表示されます (現金主義)。実際のコストには、プライベート割引、リザーブドインスタンスやセービングプランの割引が別の料金タイプとして含まれています。
azure.cost.discounted.ondemandCost based on the list rate provided by Azure, after privately negotiated discounts. To get the true on-demand cost, divide this metric by (1 - <negotiated_discount>). For example if you have a 5% flat rate discount across all Azure products, taking this metric and dividing by .95 (1-.05) provides the true on-demand price.

すぐに使えるタグ

Datadog adds out-of-the-box tags to ingested cost data to help you further break down and allocate your costs. These tags are derived from your usage cost report and make it easier to discover and understand cost data.

タグ名タグの説明
accountnameThe name of the account associated with the line item.
accountowneridThe ID of the owner associated with the line item.
billingaccountidThe ID of the billing account associated with the line item.
billingaccountnameThe name of the billing account associated with the line item.
billingcurrencyThe currency associated with the billing account.
billingperiodThe billing period of the charge.
billingperiodenddateThe end date of the billing period.
billingperiodstartdateThe start date of the billing period.
billingprofileidThe unique identifier of the Enterprise Agreement enrollment.
billingprofilenameThe name of the Enterprise Agreement enrollment.
chargetypeThe type of charge covering the line item: Usage, Purchase, or Refund.
consumedserviceThe name of the service the line item is associated with.
costcenterThe cost center defined for the subscription for tracking costs.
costinbillingcurrencyThe cost in the billing currency before credits or taxes.
costinpricingcurrencyThe cost in the pricing currency before credits or taxes.
currencyThe currency associated with the billing account.
dateThe usage or purchase date of the charge.
effectivepriceThe blended unit price for the period. Blended prices average out any fluctuations in the unit price, like graduated tiering, which lowers the price as quantity increases.
exchangeratedateThe date the exchange rate was established.
exchangeratepricingtobillingThe exchange rate used to convert the cost in the pricing currency to the billing currency.
frequencyIndicates whether a charge is expected to repeat. Charges can either happen once (OneTime), repeat on a monthly or yearly basis (Recurring), or be based on usage (Usage)
InvoiceIdThe unique document ID listed on the invoice PDF.
invoicesectionidThe ID of the MCA invoice section.
invoicesectionnameThe name of the EA department.
isazurecrediteligibletrue if the charge is eligible to be paid for using Azure credits.
locationThe data center location where the resource is running.
metercategoryThe top level service that this usage belongs to (such as Networking).
meteridThe unique ID for the meter.
meternameThe usage details of the line item (such as L8s v2 or General Purpose Data Stored).
meterregionThe data center location for the services priced based on location (such as West US 2). Use resourcelocation to see location data without N/A.
metersubcategoryThe name of the meter subclassification category (such as General Purpose - Storage). Use metername or metercategory to see top-level classification without N/A.
offeridThe name of the offer purchased.
partnumberThe ID used to get specific meter pricing.
plannameThe marketplace plan name if purchased through marketplace.
PreviousInvoiceIdReference to an original invoice if this line item is a refund.
PricingCurrencyThe currency used when rating based on negotiated prices.
pricingmodelThe type of usage (such as Reservation).
ProductIdThe identifier for a specific Azure product.
productnameThe name of the Azure product at a granular level, such as VM or disk type and region.
productorderidThe ID for the product order. Use productname to see top level product information without N/A.
productordernameThe name of the product order. Use productname to see top level product information without N/A.
publishernameThe publisher for marketplace services.
publishertypeThe type of publisher: Microsoft for Microsoft Customer Agreement accounts and Azure for Enterprise Agreement accounts.
reservationidThe ID for the purchased reservation instance. If you see N/A values, these are OnDemand resources, which can be checked using the pricingmodel tag.
reservationnameThe name of the purchased reservation instance. If you see N/A values, these are OnDemand resources, which can be checked using the pricingmodel tag.
resourcegroupThe name of the resource group the resource is in. Not all charges come from resources deployed to resource groups.
resourceidThe ID of the Azure resource.
resourcelocationThe data center location where the resource is running (such as westus2).
resourcenameThe name of the resource. Not all charges come from deployed resources.
ResourceType
servicefamilyThe service family that the service belongs to (such as Compute). The tag consumedservice has deeper insights on infrastructure types.
ServicePeriodEndDateThe termination date of the Azure service period.
ServicePeriodStartDateThe start date the Azure service period.
subscriptionidThe ID of the Azure subscription.
subscriptionnameThe name of the Azure subscription.
termDescribes the duration or term of the Savings Plan in months (such as 12).
unitofmeasureThe unit of measure for billing for the service. For example, compute services are billed per hour.

Cost and observability correlation

Viewing costs in context of observability data is important to understand how infrastructure changes impact costs, identify why costs change, and optimize infrastructure for both costs and performance. Datadog adds the name tag on cost data for top Azure products to simplify correlating observability and cost metrics.

For example, to view cost and utilization for each Azure VM, you can make a table with azure.cost.amortized and azure.vm.network_in_total (or any other VM metric) and group by name. Or, to see Storage usage and costs side by side, you can filter into metercategory:Storage and graph azure.storage.transactions and azure.cost.amortized grouped by name.

Getting historical data

You can create historical data in your storage account using the Microsoft API or by creating a support ticket with Microsoft to have them backfill cost data. Cloud Cost Management automatically pulls in up to 15 months of historical data as long as the file structure and partitioning follows the format of scheduled exports.

参考資料

PREVIEWING: esther/docs-9478-fix-split-after-example