Elastic Stack

[ logstash ] Grok Filter

구티맨 2020. 3. 17. 20:31

Grok Filter 온라인 디버거에서 메세지와 grok filter 를 입력해서 결과를 바로 볼 수 있다.

https://grokdebug.herokuapp.com/

a : 20 people, b : xoxo

메세지

a : %{NUMBER:num} people, b : %{GREEDYDATA:msg}

grok Filter

{
  "num": [
    [
      "20"
    ]
  ],
  "BASE10NUM": [
    [
      "20"
    ]
  ],
  "msg": [
    [
      "xoxo"
    ]
  ]
}

grok 결과

 

 

참조

https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html