Vantage Launches API and Terraform Support for Datadog and Cloudwatch Business Metric Integration

by Vantage Team


Vantage Launches a Data Export API

Today, Vantage is launching support for configuring Business Metric integrations for Datadog and CloudWatch using the Vantage API or Terraform Provider. This update makes it easier to manage Business Metrics as code, automate integration workflows, and maintain consistent observability configurations across environments.

Previously, configuring Business Metric integrations could only be done manually through the Vantage console. Customers used these integrations to bring in operational or business data —such as API request or subscriber count — alongside their cloud spend. This allowed them to calculate unit metrics like cost per API call or cost per subscriber. But without a programmatic interface, managing these configurations at scale was cumbersome and prone to human error.

Now, with API and Terraform support for Datadog and Cloudwatch Business Metric Integrations, customers can define, update, and manage Business Metric integrations programmatically. Customers can specify a Datadog Query or CloudWatch metric to create a new Business Metric, or additionally specify an existing business_metric_token to update an existing metric. This makes it easier for users to create or modify Business Metrics at scale, create Business Metrics in the same script that metrics are created in Datadog or AWS, and manage state of their Business Metrics.

To get started, review the updated Terraform Provider documentation or API documentation to begin configuring integrations programmatically.

Frequently Asked Questions

1. What is being launched today?

Vantage is launching API and Terraform Support for configuring Datadog and Cloudwatch Business Metric Integrations, allowing customers to programmatically configure Business Metric imports for Unit Cost calculations.

2. Who is the customer?

Any Vantage customer that utilizes Datadog or Cloudwatch for infrastructure monitoring, and wants to view these metrics alongside their infrastructure costs.

3. How much does this cost?

The API and Terraform Provider are free to all users, including those in the free tier.

4. How do I configure a Datadog Integration via API?

Send a POST API request to the /business_metrics endpoint. Details on parameters used in this sample request are provided below:

curl --request POST \
     --url https://api.vantage.sh/v2/business_metrics \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN' \
     --header 'content-type: application/json' \
     --data @- <<EOF
{
  "datadog_metric_fields": {
    "integration_token": "accss_crdntl_1234567890",
    "query": "sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)"
  },
  "title": "ELB Request Count Sum (us-east-1)"
}
EOF

In the above request:

  • Each request requires the associated integration_token of the Datadog integration you want to pull metrics from. You can retrieve this from the /integrations endpoint.
  • The Datadog query in Datadog Query Syntax.
  • The title you would like to give the Business Metric in Vantage.
  • You can optionally pass a cost_report_token, unit_scale, and label_filter if you wish to assign your business metric to a Cost Report at the time of creation.

5. How do I configure a Cloudwatch Integration via API?

Send a POST API request to the /business_metrics endpoint. Details on parameters used in this sample request are provided below:

curl --request POST \
     --url https://api.vantage.sh/v2/business_metrics \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN' \
     --header 'content-type: application/json' \
     --data @- <<EOF
{
  "cloudwatch_fields": {
    "integration_token": "accss_crdntl_0987654321",
    "stat": "Average",
    "region": "us-east-1",
    "namespace": "AWS/EC2",
    "metric_name": "CPUUtilization",
    "dimensions": [
      {
        "name": "InstanceId",
        "value": "i-1234567890"
      }
    ]
  },
  "title": "Instance Utilization"
}
EOF

In the above request:

  • Each request requires the associated integration_token of the AWS integration you want to pull metrics from. You can retrieve this from the /integrations endpoint.
  • Metadata about the Cloudwatch metric you want to import, such as stat (i.e. Average, Sum), region, namespace, metric_name, and dimensions.
  • The title you would like to give the Business Metric in Vantage.
  • You can optionally pass a cost_report_token, unit_scale, and label_filter if you wish to assign your business metric to a Cost Report at the time of creation.

6. What methods are available with the /business_metrics endpoint?

The /business_metrics endpoint uses the GET , POST, PUT, and DELETE methods.

7. How do I configure a Datadog Integration via Terraform?

Create a vantage_business_metric resource, such as the following example.

resource "vantage_business_metric" "datadog_metric" {
  title = "ELB Request Count Sum (us-east-1)"
  datadog_metric_fields = {
    integration_token = "accss_crdntl_1234567890"
    query             = "sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)"
  }
}

In the above resource:

  • Each resource requires the associated integration_token of the Datadog integration you want to pull metrics from. You can retrieve this from the /integrations endpoint.
  • The Datadog query in Datadog Query Syntax.
  • The title you would like to give the Business Metric in Vantage.

8. How do I configure a Cloudwatch Integration via Terraform?

Create a vantage_business_metric resource, such as the following example.

resource "vantage_business_metric" "cloudwatch_metric" {
  title = "Average CPU Utilization (i-1234567890)"
  cloudwatch_fields = {
    integration_token = "accss_crdntl_1234567890"
    stat              = "Average"
    region            = "us-east-1"
    namespace         = "AWS/EC2"
    metric_name       = "CPUUtilization"
    dimensions = [
      {
        name  = "InstanceId"
        value = "i-1234567890"
      }
    ]
  }
}

In the above resource:

  • Each resource requires the associated integration_token of the AWS integration you want to pull metrics from. You can retrieve this from the /integrations endpoint.
  • Metadata about the Cloudwatch metric you want to import, such as stat (i.e. Average, Sum), region, namespace, metric_name, and dimensions.
  • The title you would like to give the Business Metric in Vantage.

9. Will this affect existing Business Metric configurations?

No, any existing configurations set via the Vantage UI will remain unchanged. This release simply adds new, programmatic ways to manage them.

10. Can I still create Datadog and Cloudwatch Business Metrics in the Vantage Console?

Yes, you can still continue to create Datadog or Cloudwatch Business Metrics in the Vantage Console.

11. How do I authenticate with the API and Terraform?

The Vantage API and Terraform Provider use API tokens for authentication. You can create both user and service tokens in the console. An API key can be assigned Read and Write scopes. See the API documentation for details on how to get started with API keys.

12. Who has permission to use the API?

All users can generate Read API keys. Using the API key, you can retrieve unit costs for any Cost Report the user that creates the API keys has access to in the Vantage console.

13. Can I list my Business Metric Integrations using the Vantage MCP Server?

At this time, the Vantage MCP does not have a Tool for listing Business Metrics.