1

I have an EC2 instance setup in a private vpc network with the IAM role shown below:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "CloudWatchAccess",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "EC2",
            "Effect": "Allow",
            "Action": [
                "ec2:DescribeInstances"
            ],
            "Resource": "*"
        }
    ]
}

And my logstash configuration file has:

input {
stdin{}
cloudwatch {
namespace => "AWS/EC2"
        metrics => [ 'CPUUtilization']
        filters => { "tag:TAG" => "VALUE" }
        region => "us-east-1"
    proxy_uri => “http://proxy.company.com:port/”
}
}
output {
stdout {
codec => rubydebug
  }
  elasticsearch {
hosts => ["IP:PORT"]
  }
}

I start my logstash using:

/path/to/logstash -f /path/to/logstash.conf

The command runs and I can see data from cloudwatch in debug mode:

{:timestamp=>"2016-04-13T17:26:40.685000-0400", :message=>"DPs: {:datapoints=>[{:timestamp=>2016-04-13 21:24:00 UTC, :sample_count=>2.0, :unit=>\"Percent\", :minimum=>0.17, :maximum=>0.25, :sum=>0.42000000000000004, :average=>0.21000000000000002}, {:timestamp=>2016-04-13 21:22:00 UTC, :sample_count=>2.0, :unit=>\"Percent\", :minimum=>0.08, :maximum=>0.17, :sum=>0.25, :average=>0.125}], :label=>\"CPUUtilization\", :response_metadata=>{:request_id=

but logstash doesn't push anything to elasticsearch.

Does anyone have any idea what might be the issue? Or know how I can debug this?

devlin carnate
  • 8,309
  • 7
  • 48
  • 82
Ali-Sh
  • 26
  • 2

1 Answers1

0

To solve this issue you can use the 1.1.2 version of the plugin or update your cloudwatch.rb and logstash-input-cloudwatch.gemspec: https://github.com/logstash-plugins/logstash-input-cloudwatch/pull/3/files

Ali-Sh
  • 26
  • 2