Logstash-cloudwatch-input插件不会向Elasticsearch发送数据

时间:2016-04-14 14:50:04

标签: amazon-web-services elasticsearch logstash cloudwatch

我在私有vpc网络中设置了EC2实例,其IAM角色如下所示:

's/(.*)-/$1##/'

我的logstash配置文件有:

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

我使用以下命令启动我的logstash:

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"]
  }
}

该命令运行,我可以在调试模式下看到来自cloudwatch的数据:

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

但是logstash没有将任何内容推送到elasticsearch。

有没有人知道可能是什么问题?或者知道如何调试这个?

1 个答案:

答案 0 :(得分:0)

要解决此问题,您可以使用1.1.2版本的插件或更新您的cloudwatch.rb和logstash-input-cloudwatch.gemspec: https://github.com/logstash-plugins/logstash-input-cloudwatch/pull/3/files