logstash-plugins / logstash-input-cloudwatch

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

ELB namespace request [and self-volunteering] #20

Open baweaver opened 7 years ago

baweaver commented 7 years ago

Request for ELB namespaced cloudwatch metrics.

Also I'd be willing to write this as well, just need to find the resources key (which is probably ElbId or something similar)

baweaver commented 7 years ago

Probably something like this, all things considered:

when 'AWS/ApplicationELB'
  load_balancers = clients[@namespace]
    .describe_load_balancers(filters: aws_filters)[:load_balancer_descriptions]
    .flat_map { |e| e[:load_balancer_name] }

  @logger.debug "AWS/ApplicationELB ELBs: #{load_balancers}"

  { 'LoadBalancerName' => load_balancers }

ELB Client method: http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/ELB/Client.html#describe_load_balancers-instance_method

Associated namespace and metrics: http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elb-metricscollected.html

catalinvr commented 6 years ago

Hi @baweaver,

Do you know when your pull request will be merge into master?

Thanks.