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

Feature request: Possibility to not use filter #9

Open davidwestlund opened 8 years ago

davidwestlund commented 8 years ago

Hi

It would be a nice feature to not have to provide a filter. Instead all possible metrics should be fetched when no filter has been provided. Alternatively, it could be supported to provided an empty filter (ie. filter => {}) which could then be used as a "catch all" alternative.

BR, David Westlund

jrgns commented 8 years ago

Good idea. Let me just check if the filters isn't a required parameter for the call we use to AWS. Otherwise it should be easy to implement.

davidwestlund commented 8 years ago

I changed the code to make filter non obligatory and I tested. It works without any filter for EC2 instances. I have created a pull request with the code I have used during my testing, if you want to try it out yourself.

It seems like filter is an obligatory argument for some metrics. For example, namespace "AWS/Billing" require filters => { "currency" => "USD"} as well as combined => true to work. Since this differs between different metrics, I think it makes sense to have this as an optional option just like combined.