I appreciate the response! I don't really understand how it works, but I was able to use your suggestion as a guide and came up with this. The two events have different source types so I needed the OR. I had always thought "count" was just for summing up on fields, yet here the field values I need are in the results. So I guess in my situation "where count=1" works because the primary event will always have a match. So a count of 1 means the primary search matched and the secondary didn't, not the other way around. index=idx1
(sourcetype=source1 "Queueing create notifications for EventId:") OR
(NotificationService CREATED EVENT sourcetype=source2)
| rex "EventId: (?<event_id1>\d+) in client (?<client_id>\d+)"
| rex "\"eventId\",\"value\":\"(?<event_id2>\d+)"
| eval event_id=coalesce(event_id1,event_id2) | fields client_id, event_id
| stats values(*) as * count by event_id
| where count=1
... View more