我已经看到flush_size
控制lumberjack(logstash-forwarder)中每个请求发送的事件,但我已将其设置为150默认值,如下所示
config :flush_size, :validate => :number, :default => 150
文件:/opt/logstash/lib/logstash/outputs/elasticsearch_http.rb
但我仍然没有看到伐木工人每次请求发送超过100个事件。
Jan 23 16:59:01 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:01.496540 Connecting to [127.0.0.1]:5000 (127.0.0.1)
Jan 23 16:59:01 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:01.828968 Connected to 127.0.0.1
Jan 23 16:59:08 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:08.146238 Registrar received 100 events
Jan 23 16:59:13 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:13.500840 Registrar received 100 events
Jan 23 16:59:16 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:16.938172 Registrar received 100 events
Jan 23 16:59:18 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:18.330341 Registrar received 100 events
Jan 23 16:59:19 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:19.347694 Registrar received 100 events
Jan 23 16:59:20 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:20.341879 Registrar received 100 events
Jan 23 16:59:21 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:21.339127 Registrar received 100 events
Jan 23 16:59:23 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:23.060140 Registrar received 100 events
Jan 23 16:59:24 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:24.680771 Registrar received 100 events
Jan 23 16:59:26 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:26.196146 Registrar received 100 events
Jan 23 16:59:27 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:27.043658 Registrar received 100 events
Jan 23 16:59:28 197nodnb13846 logstash-forwarder[30342]: 2015/01/23 16:59:28.203279 Registrar received 100 events
此后我重新启动了logstash和logstash-forwarder,但它仍无法正常工作。
答案 0 :(得分:1)
编辑init脚本并更改-spool-size:
的值grep DAEMON_ARGS /etc/init.d/logstash-forwarder
DAEMON_ARGS =" -config / etc / logstash-forwarder -spool-size 100 -log-to-syslog"
/etc/init.d/logstash-forwarder restart