0

I am woking with AWS Kinesis and CouldWatch. How can I fetch many metrics of one shard with one request? This is how I get one metric:

GetMetricStatisticsRequest request = new GetMetricStatisticsRequest();
request.withNamespace(namespace)
         .withDimensions(dimensions)
         .withPeriod(duration)
         .withStatistics(statistic)
         .withMetricName(metricName)
         .withStartTime(startTime)
         .withEndTime(endTime);
Spider
  • 1,380
  • 4
  • 22
  • 42

1 Answers1

1

You can't fetch data for multiple metrics with one call to GetMetricStatistics.

GetMetricStatistics API takes metric name and a list of dimensions, which together define exactly one metric. To get data for multiple metrics you'll have to make multiple GetMetricStatistics calls.

Dejan Peretin
  • 10,891
  • 1
  • 45
  • 54