FilebeatMultiline: различия между версиями

Материал из noname.com.ua
Перейти к навигацииПерейти к поиску
Строка 20: Строка 20:
 
** after
 
** after
   
  +
=Случай 1=
 
 
* pattern = ^b
 
* pattern = ^b
 
* multiline.negate = false
 
* multiline.negate = false
Строка 38: Строка 38:
 
become <B>"abb"</B> and <B>"cbb"</B>
 
become <B>"abb"</B> and <B>"cbb"</B>
   
  +
=Случай 1=
 
false
 
false
   
Строка 46: Строка 47:
 
Lines b b a b b c become "bba" and "bbc"
 
Lines b b a b b c become "bba" and "bbc"
   
  +
=Случай 1=
 
true
 
true
   
Строка 54: Строка 56:
 
Lines b a c b d e become "bac" and "bde"
 
Lines b a c b d e become "bac" and "bde"
   
  +
=Случай 1=
 
true
 
true
  +
   
 
before
 
before
   
 
Consecutive lines that don’t match the pattern are prepended to the next line that does match.
 
Consecutive lines that don’t match the pattern are prepended to the next line that does match.
  +
Lines a c b d e b become "acb" and "deb"
   
 
=Тестовые данные=
 
=Тестовые данные=

Версия 16:28, 10 августа 2021

Filebeat multiline

С этой темой вечная проблема - разобрался, настроил и забыл. Через пол года нужно разбираться заново, и что б сэкономить время решил сделать заметку.
Скорее всего так же ведет себя и Logstash

Параметры

Параметры которые определяют поведение и их возможные значения:

  • multiline.negate
    • true
    • false
  • multiline.match
    • before
    • after

Случай 1

  • pattern = ^b
  • multiline.negate = false
  • multiline.match = after

Consecutive lines that match the pattern are appended to the previous line that doesn’t match. Последующие строки соответвуют паттерну добавляются к предыдущей строке которая не соответвует Lines

a
b
b
c
b
b 
become "abb" and "cbb"

Случай 1

false before Consecutive lines that match the pattern are prepended to the next line that doesn’t match. Lines b b a b b c become "bba" and "bbc"

Случай 1

true after Consecutive lines that don’t match the pattern are appended to the previous line that does match. Lines b a c b d e become "bac" and "bde"

Случай 1

true before Consecutive lines that don’t match the pattern are prepended to the next line that does match. Lines a c b d e b become "acb" and "deb"

Тестовые данные

Ссылки

* https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html