Splunk Enterprise Security

trying to do join between same column name ,expect to get only the result if the site ID is equal?

Avichai
New Member

this is my table:

moduleName  siteName    companyDUNS siteID
abc         site1          1111      16682
bbb         site2          22222          6956
ccc          site3         3333       28118

this is my lookup table(suppliers):

SiteName    DUNS    SiteID
site2          1111 16682
site3           666  16684
site1      55555566 55555

this is my query:

|inputlookup Suppliers | mvexpand SiteID |join Site ID:' [search sourcetype=UserActivity  | rex field=_raw " Module name: (?.*), Site name: (?.*), Site ID: (?.*), Site Duns: (?.*), User full name: (?.*), User ID: (?.*), User roles: (?.*)"  | search moduleName=incominggeneralledger
| table _time,moduleName,siteName,companyDUNS,siteID,Userfullname,UserID,UserRole]

expected result:

moduleName  siteName    companyDUNS siteID  SiteName    DUNS    SiteID
abc         site1           1111     16682      site2    1111   16682

from this result i want only

moduleName  siteName    companyDUNS siteID 
abc          site1  1111                   16682 

Thanks

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@Avichai

Can you please try this search?

search sourcetype=UserActivity 
| rex field=_raw " Module name: (?.), Site name: (?.), Site ID: (?.), Site Duns: (?.), User full name: (?.), User ID: (?.), User roles: (?.*)" 
| search moduleName=incominggeneralledger 
| table _time,moduleName,siteName,companyDUNS,siteID,Userfullname,UserID,UserRole | lookup Suppliers siteID OUTPUTNEW SiteName as SiteNameNew
| where isnotnull(SiteNameNew)
| table moduleName siteName companyDUNS siteID 

Note: I took this search from your questions. You have to replace original search before executing.

0 Karma

Avichai
New Member

thanks,
i didn't got any results

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Try this one:

YOUR_MAIN_SEARCH
| table moduleName siteName companyDUNS siteID 
| lookup Suppliers SiteID as siteID 
| where isnotnull(DUNS) 
| table moduleName siteName companyDUNS siteID

My Sample Search:

| makeresults 
| eval _raw="
moduleName    siteName    companyDUNS    siteID
 abc            site1           1111         16682
 bbb            site2           22222          6956
 ccc             site3           3333          28118
 " 
| multikv 
| table moduleName siteName companyDUNS siteID 
| lookup Suppliers SiteID as siteID 
| where isnotnull(DUNS) 
| table moduleName siteName companyDUNS siteID
0 Karma

Avichai
New Member

i tried the first query:
got no results.

how can i try the second query i have lots of records?

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 ...