logstash的output设置为elasticsearch时,实际上logstash在向es中插入数据时也是bulk提交的,和指提交相关的设置有以下两个参数:
flush_size
Value type is number
Default value is 500
This plugin uses the bulk index API for improved indexing performance. To make efficient bulk API calls, we will buffer a certain number of events before flushing that out to Elasticsearch. This setting controls how many events will be buffered before sending a batch of events. Increasing the flush_size has an effect on Logstash’s heap size. Remember to also increase the heap size using LS_HEAP_SIZE if you are sending big documents or have increased the flush_size to a higher value.
表示多少条flush一起提交到es.
idle_flush_time
Value type is number
Default value is 1
The amount of time since last flush before a flush is forced.
This setting helps ensure slow event rates don’t get stuck in Logsta