influxdata / influxdata/telegraf

CloudWatch Metrics Input Plugin to Support Percentile Based Metrics

Open
#7,951 6 comments 1 reaction 0 assignees View on GitHub
area/aws cloud feature request help wanted size/m
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

## Feature Request

Opening a feature request kicks off a discussion.

### Proposal:
The CloudWatch [GetMetricData](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) API call has the capability to use an [Expression ](https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatch/) to allow for gathering pXX.XX (IE p95) statistics metrics.

### Current behavior:

Based on [this](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/cloudwatch/cloudwatch.go#L412) function, only 'minimum, maximum, sum, samplecount, average' are supported metric values. There is no extendedmetrics available which would be used by extended metrics.

### Desired behavior:
Allow for pXX.XX to be valid metrics to be gathered by the CloudWatch input plugin.

### Use case:
For statistical analysis, it is often better to throw out outliers of a dataset to keep from distracting from underlying trends. Using p95 allows for a higher confidence interval in what real "max" usage is, p5 similarly for "minimum" usage, and p50 for "average" usage. This allows for a statistics_input object to contain arbitrary pXX.XX values and return them from the GetMetricData API. This is suggested as an additional option, rather than complete replacement, to allow for users of this plugin to choose which statistic set they prefer.

Contributor guide

Open the contributing guide

Research direction

Start with the CloudWatch input plugin in cloudwatch.go around line 412 and review the AWS GetMetricData API and Expression documentation linked in the issue. Determine how percentile statistics such as p95 can be accepted alongside the existing metrics, then verify that the plugin returns those values without removing current statistic options.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go
Domain
cloud, observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.