I am looking to migrate many of parsers away from grokking and towards dissect when feasible. i had a question pertaining to performance
%{header}-%{timestamp}-%{payload}
-Dissect logs into 3 segments
-Timestamp will be extracted and mutated to target @timestamp
-Conditionals to dissect payload-segment accordingly into sub-segments
filter {
[dissect] (mapping -> head-timestamp-payload)
if [dissect]
else if [dissect]
else [dissect]
[/dissect]
[mutate > tempdate]
[date] [tempdate > @timestamp]
[mutate > remove tempdate]
}
filter {
[dissect] (mapping -> head-timestamp-payload)
if [dissect]
[mutate > tempdate]
[date] [tempdate > @timestamp]
[mutate > remove tempdate]
else if [dissect]
[mutate > tempdate]
[date] [tempdate > @timestamp]
[mutate > remove tempdate]
else [dissect]
[mutate > tempdate]
[date] [tempdate > @timestamp]
[mutate > remove tempdate]
[/dissect]
this may be a dumb question, but which way is optimal?