github: https://github.com/awslabs/logstash-output-amazon_es/issues/55
flush_size => 10, . , , , , : retry_max_items => 1
logstash API, logstash , , :
curl -XGET 'localhost:9600/_node/stats/pipeline?pretty' -s | jq . | awk 'BEGIN {FS="{|}|: |\," } /"in":/ { i=$2 ; next }; /"out":/ { o=$2 ; next } /"id":/ { id=$2 }; /name/ { print $0, i-o , id } '
in-out - , amazon_es
10 . , , , .
, :
filter {
(...)
truncate {
length_bytes => "1073741824"
fields => [ "message", "error" , "error_orig" ]
}
(...)
}
output {
(...)
amazon_es {
id => "producer"
hosts => "${ES_HOSTNAME}"
index => "logstash-%{+YYYY.MM.dd}-%{[type]}-%{[environment]}"
document_type => "%{[type]}"
flush_size => 10
retry_max_items => 1
}
(...)
}
, -