Splunk Search

How to Join fields from 2 indexes

r2r2
Explorer

Hello!
I am trying to make a dashboard with fields from 2 indexes using the command "join".
I wrote a search source="WinEventLog:Security" EventCode=4624 AccountName!="*$" | eval user = mvindex(AccountName,1) |dedup user | join type=left user [index=anotherindex employeeID=*] | table _time, user, employeeID

But column employeeID is empty. What did I do wrong?

Tags (2)
0 Karma
1 Solution

jitsinha
Path Finder

Use this one

source="WinEventLog:Security" EventCode=4624 AccountName="*$" | eval user = mvindex(AccountName,1) |dedup user | join type=left user [search index=anotherindex employeeID=* ] | table _time, user, employeeID

View solution in original post

jitsinha
Path Finder

Use this one

source="WinEventLog:Security" EventCode=4624 AccountName="*$" | eval user = mvindex(AccountName,1) |dedup user | join type=left user [search index=anotherindex employeeID=* ] | table _time, user, employeeID

jitsinha
Path Finder

glad it resolved your issue

r2r2
Explorer

I found one more mistake in this search and now it works properly.
Your answer resolved my issue. Thank you!

0 Karma

r2r2
Explorer

I added "search" but column "employeeID" is still empty.

0 Karma

r2r2
Explorer

And I found a mistake - there is "AccountName*!="$""

source="WinEventLog:Security" EventCode=4624 AccountName!="*$" | eval user = mvindex(AccountName,1) |dedup user | join type=left user [ search index=anotherindex employeeID=* ] | table _time, user, employeeID

jitsinha
Path Finder

chersss!!!

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...