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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...