Skip to main content

Building Event Search with Full Outer Join

  • February 18, 2026
  • 1 reply
  • 16 views

Jsandy

Is it possible to build an event search (not rule), that aggregates events from two different sources, correlating on a custom user field built from regex.

What I am trying to do is get events from two different event sources where they have the same username field (custom created to normalise the username from different fields within each event source) and simply aggregate these.

 

The idea being that for a user I want to see all related events that meet some criteria in each event source, Id imagine when actually showing the relevant fields for some rows there will be empty values for where that particular field exists in one event type it does not exist in the other.

 

Sample:

events:

// --- AWS LOGIC ---

// Add hashi.target.user.user_display_name = “someuser@mail.com”

$aws.metadata.vendor_name = "amazon"

$aws.metadata.product_event_type = /AssumeRole(WithWebIdentity|WithSAML)?/

 

// --- HASHICORP LOGIC ---

// Add hashi.target.user.user_display_name = “okta-someuser”

$hashi.metadata.log_type = "HASHICORP"

$hashi.target.user.user_display_name = /^(okta|ldap)-.*/

$hashi.target.url = /.*(secret|kv)\/.*/

 

// --- SHARED BINDING ---

// This connects both event types to the same match variable

$username = re.capture($aws.principal.user.user_display_name, "([^@]+)@mail.com")

$username = re.capture($hashi.target.user.user_display_name, "^(?:okta-|ldap-)(.*)")

 

match:

$username over 1h

 

condition:

$aws or $hashi

1 reply

Asura
Forum|alt.badge.img
  • February 18, 2026

Hello ​@Jsandy,

 

Yes it is possible, at least I was able to do it on my side. The event section of the query looks good. 

 

Could you try to change in the condition section by replacing “or” by “and”?

 

Do not hesitate to let me know if there is an error message after doing the change