Hi!
Been scratching my head on this all day. Could use some help. I am using elasticsearch 7.17.6. I have filebeat set to read log file, use a dissect processor, sends to logstash.
My problem is I am trying to grok this dissect field but I am unable to get any value.
The field is dissect.msg.
"dissect": {
"level": "D",
"timestamp": "2024-06-01T11:55:50,070",
"thread": "FL",
"instance": "aa1",
"msg": "[FM] (-156376144) Received 8=FIX.4.4\u00019=84\u000135=0\u000149=aa1-fix-trade1p\u000156=TEST\u000134=299\u000157=TEST\u000152=20240601-16:55:50.070\u0001112=TEST\u000110=173\u0001 ",
"logger": "com.firm.nx.fix.monitoring.Log4jDebugAppender"
},
filebeat.yml
filebeat.inputs:
- type: log
enabled: true
paths:
- /usr/share/filebeat/ingest_data/*.log
multiline:
pattern: '^\t'
match: after
processors:
- add_tags:
tags: ['fts']
- dissect:
field: message
tokenizer: "%{level} %{timestamp} [%{thread}] %{logger} - %{msg}"
- dissect:
field: log.file.path
tokenizer: "%{?path}/fts.%{instance}.%{?ext}"
logstash.conf
if "fts" in [tags] and [dissect][msg] =~ /^\[FM\]/ {
grok {
match => { 'msg' => '^%{GREEDYDATA:fix-message}$'}
add_tag => [ "fix_message" ]
add_field => {
"test" => "fix message %{fix-message}"
}
}
}
I am expecting the test field to be
fix message [FM] (-156376144) Received 8=FIX.4.4\u00019=84\u000135=0\u000149=aa1-fix-trade1p\u000156=TEST\u000134=299\u000157=TEST\u000152=20240601-16:55:50.070\u0001112=TEST\u000110=173\u0001
But instead when I look in kibana it shows: