有人可以帮忙吗。我需要修复错误,以便可以将 S3 中的 CloudTrail 日志传送到 ES 的 Logstash 并在 Kibana 中查看。无法弄清楚如何将字段限制增加到更高的值。我的配置看起来像
input {
s3 {
bucket => "sample-s3bucket"
region => "eu-west-1"
type => "cloudtrail"
codec => cloudtrail {}
sincedb_path => "/tmp/logstash/cloudtrail"
exclude_pattern => "/CloudTrail-Digest/"
interval => 300
}
}
filter {
if [type] == "cloudtrail" {
json {
source => "message"
}
geoip {
source => "sourceIPAddress"
target => "geoip"
add_tag => ["cloudtrail-geoip"]
}
}
}
output {
elasticsearch {
hosts => "coordinate_node:9200"
index => 'cloudtrail-%{+YYYY.MM.dd}'
}
stdout {
codec => rubydebug
}
}
这是我在 Logstash 机器上看到的内容limit
2018-10-04T17:49:49,883][WARN][logstash.outputs.elasticsearch] 无法将事件索引到 Elasticsearch。{:status=>400, :action=>["index", {:_id=>nil, :_index=>"cloudtrail-2018.09.27", :_type=>"doc", :_routing=>nil}, #], :response=>{"index"=>{"_index"=>"cloudtrail-2018.09.27", "_type"=>"doc", "_id"=>"lrMzQGYBOny1_iySNW6G", "status"=> 400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"已超出索引 [cloudtrail-2018.09.27] 中总字段 [1000] 的限制"}}}
提前致谢