logstash-plugins / logstash-input-cloudwatch

A Logstash input to pull events from the Amazon Web Services CloudWatch API
Apache License 2.0
43 stars 28 forks source link

AWS/EC2 giving only 2 datasets, while 3 datasets were expected #4

Closed subhash12 closed 8 years ago

subhash12 commented 8 years ago

Using the dafault values for Interval (15 minutes) and Period (5 minutes). AWS/RDS is providing 3 datasets for the above Interval, while AWS/EC2 is only giving 2 datasets.

denniswebb commented 8 years ago

I'm having the same issue with AWS/EC2 metrics. Put it on 5min/5min and 75% of my instances never return metrics, even though they're there. I have verified time is properly set. I think Cloudwatch is slow to return metrics that have just been posted. Not a bug in the code here. I decided I'd rather get more data late, than miss data immediately. Make the following change to the metric_options function to tell it to push the interval window back 5 minutes.

start_time: (Time.now.utc - @interval - 300).iso8601,
end_time: (Time.now.utc - 300).iso8601,

If it works better for you this way, let me know and I'll create a config parameter so we can adjust this to whatever we like.

subhash12 commented 8 years ago

@dennis-bsi I too was suspecting the slowness of Cloudwatch to return the metrics. But for RDS, I was receiving all. After moving back the interval vindow to 5 minutes, Im getting all the datasets, Thanks.

tomaszrichert commented 7 years ago

I'm experiencing exact same problem, and I will have to modify code as above. Is it possible to release new version with 'delay' parameter ?