Logstash multiline 限制行數大小引數
阿新 • • 發佈:2019-01-28
Logstash -> Input配置如下:
file { type => "test_aaa" path => ["/usr1/app/logs/aaa"] sincedb_path => "/home/jfy/soft/logstash-2.0.0/sincedb_aaa.access" start_position => "beginning" codec => multiline { max_bytes => "10MiB" max_lines => 500 charset => "GBK" pattern => "^(?!.*?=== >>>>>>>> ===).*$" what => "previous" } }
multiline合併,預設最大合併500行,最大大小10M
昨天由於程式出錯導致一個請求出現了50000多行Err Log,由於Logstash multiline合併導致出現了一個大文件,在kibana顯示時顯示不出來,可以通過適當調節這兩個引數來限制合併日誌的行數與大小