Enhancement: Make AWS billing metricset time range configurable
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 364
Description
**Describe the enhancement:**
Add support for configuring the time range used by the AWS billing metricset when collecting billing and cost data.
AWS GetCostAndUsage API supports a [TimePeriod](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetCostAndUsage.html#awscostmanagement-GetCostAndUsage-request-TimePeriod) parameter for the query range. It appears the AWS billing metricset currently derives that range from the metricset `period`, rather than letting users configure the billing query window independently.
https://github.com/elastic/beats/blob/main/x-pack/metricbeat/module/aws/billing/billing.go
Separating the billing query time range from the collection interval would make the metricset more flexible.
**Describe a specific use case for the enhancement or feature:**
We should be able to control how far back the billing metricset looks when querying AWS billing data. Different environments collect on different schedules and use the data for different reporting purposes, so a fixed or implicit time window can be limiting. A configurable time range would make it easier to align collection with users' internal billing review periods and support both shorter and longer monitoring windows.
Contributor guide
Assessment
This issue has not been assessed yet.