Splunk Search

What is the fastest way to use a lookup (or match records against a secondary source)?

loganramirez
Path Finder

I have index with json data that represents call data (phone calls), but there is nothing native in the index that represents lists.

Assume, for example, I have a list called "Splunk Legends" and it represents 10 numbers.

Currently if I want to 'count all calls last 30d from Splunk Legends, then I do

 

 

index=mydata 
| stats value(*) by guid -- because I'm joining some other interesting information in this index
| lookup mylookup.csv number OUTPUT list
| search list="Splunk Legends"

 

 


What I dislike about this, of course, is I have to search the entire index.

Thoughts on a better way to match value against an external data source?

Thank you!

 

 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try incorporating the lookup into the base search.

index=mydata [ | inputlookup mylookup.csv where list="Splunk Legends" | fields number | format ]
| stats value(*) by guid -- because I'm joining some other interesting information in this index
...
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Try incorporating the lookup into the base search.

index=mydata [ | inputlookup mylookup.csv where list="Splunk Legends" | fields number | format ]
| stats value(*) by guid -- because I'm joining some other interesting information in this index
...
---
If this reply helps you, Karma would be appreciated.

loganramirez
Path Finder

thoughts on the 10k limit using sub searches like this?  just ran into that.

 

0 Karma

loganramirez
Path Finder

Legend.  Thank you!

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...