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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

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