I think the addition of a few evals can account for the error line as well. Maybe something like this? <base_search>
| rex field=_raw "Processing\s+(?<process>[^\-]+)\-"
| rex field=_raw "Person\s+Name\:\s+(?<person_name>[^\,]+)\,"
| sort 0 +_time
| streamstats reset_before="("isnotnull(process)")"
values(process) as current_process
| streamstats window=2
first(_raw) as previous_log
| rex field=previous_log "Person\s+Name\:\s+(?<previous_log_person_name>[^\,]+)\,"
| eval
checked_person_name=if(
match(previous_log, "\-Check\s+for\s+Person\-"),
'person_name',
null()
),
status_error_person=if(
match(previous_log, "Person\s+Name:\s+") AND match(_raw, "\-error\s+in\s+checking\s+status"),
'previous_log_person_name',
null()
)
| stats
min(_time) as _time
by current_process, status_error_person
| fields + _time, current_process, status_error_person
... View more