I have some strange results while trying to query the 'Volume Write Bytes' metric using get_metric_statistics
for some of my EBS Volumes. I was wondering if someone can help me understand the response I'm getting from AWS, for the purpose of this post please take into account that the real volume id has been changed to "vol-1234".
{"Cloudwatch Args"=>{:namespace=>"AWS/EBS", :metric_name=>"VolumeWriteBytes", :dimensions=>[{:name=>"VolumeId", :value=>"vol-1234"}], :start_time=>2020-01-06 12:41:58 UTC, :end_time=>2020-01-06 15:41:
58 UTC, :period=>300, :statistics=>["Average", "Minimum", "Maximum"]}, :account=>11, :region=>"us-east-1"}
HTTP POST (152.32ms) https://monitoring.us-east-1.amazonaws.com:443/
Response status Net::HTTPOK (200)
Response body <impossible to log>
=> [#<struct Aws::CloudWatch::Types::Datapoint timestamp=2020-01-06 13:56:00 UTC, sample_count=nil, average=4767.288888888889, sum=nil, minimum=0.0, maximum=0.0, unit="Bytes", extended_statistics={}>,
#<struct Aws::CloudWatch::Types::Datapoint timestamp=2020-01-06 13:21:00 UTC, sample_count=nil, average=5512.661654135339, sum=nil, minimum=0.0, maximum=0.0, unit="Bytes", extended_statistics={}>,
#<struct Aws::CloudWatch::Types::Datapoint timestamp=2020-01-06 15:06:00 UTC, sample_count=nil, average=5371.133079847908, sum=nil, minimum=0.0, maximum=0.0, unit="Bytes", extended_statistics={}>,
...
Can someone explain why the Average value seems to be around 4-5k, while the Maximum and Minimum values are 0.0 ? This seems to happen on multiple volumes and it's not an isolated case.