【问题标题】:Logstash-cloudwatch-input plugin is not sending data to ElasticsearchLogstash-cloudwatch-input 插件未向 Elasticsearch 发送数据
【发布时间】:2016-08-06 05:18:36
【问题描述】:

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

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

我使用以下方式启动我的 logstash:

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

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

{: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=

但logstash不会向elasticsearch推送任何内容。

有人知道可能是什么问题吗?或者知道我该如何调试?

【问题讨论】:

    标签: amazon-web-services elasticsearch logstash cloudwatch


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2017-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-22
      • 1970-01-01
      • 2015-09-29
      • 2016-09-09
      • 1970-01-01
      相关资源
      最近更新 更多