解决 Reason: The setting `flush_size` in plugin `elasticsearch` is obsolete and is no longer available

[root@c2 logstash-6.4.2]# ./bin/logstash -f etc/logstash_indexer.conf  -t

Sending Logstash logs to /usr/local/logstash-6.4.2/logs which is now configured via log4j2.properties
[2018-10-25T17:05:46,647][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-10-25T17:05:49,572][FATAL][logstash.runner          ] The given configuration is invalid. Reason: The setting `flush_size` in plugin `elasticsearch` is obsolete and is no longer available. This setting is no longer available as we now try to restrict bulk requests to sane sizes. See the 'Batch Sizes' section of the docs. If you think you still need to restrict payloads based on the number, not size, of events, please open a ticket. If you have any questions about this, you are invited to visit https://discuss.elastic.co/c/logstash and ask.
[2018-10-25T17:05:49,591][ERROR][org.logstash.Logstash    ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

输出到elasticsearch有些参数不支持了,需要注释flush_size,否则会报错The setting flush_size in plugin elasticsearch is obsolete and is no longer available. This setting is no longer available as we now try to restrict bulk requests to sane sizes. See the ‘Batch Sizes’ section of the docs.

input {
        redis {
                host => "192.168.133.130"
                data_type => "list"
                port => "6379"
                key => "logstash:redis"
                type => "redis-input"
        }
}

output {
    elasticsearch {
        hosts => ["192.168.133.128:9200"]
        index => "logstash-%{type}-%{+YYYY.MM.dd}"
        document_type => "%{type}"
#        flush_size => 20000
#        idle_flush_time => 10
        sniffing => true
        template_overwrite => true
    }
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值