Splunk Search

How can I specify specific lines within my lookup file to search against?

the_wolverine
Champion

I have a large resultset, lookupb.csv which consists of about 4 million lines, that I'm searching against that I need to break up in order to bypass the 10k result limit in subsearch.

Example:

| inputlookup lookupa.csv | search NOT [ |inputlookup lookupb.csv | head 10000 | fields fieldname ]

Obviously, I have a way to get 10000 first lines, and maybe 10000 last lines, but what about in-between?

0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

One option could be to have serial no in the lookup file itself or add serial no in subsearch and search based on it.

|inputlookup lookupb.csv | eval sno=1 | accum sno | where sno >= yourlowerlimit AND sno <= yourupperlimit

Also, consider option to increase the limit value in limits.conf so that there are less no of breakups.

View solution in original post

the_wolverine
Champion

That worked! Make it an answer so I can accept it.

0 Karma

somesoni2
SplunkTrust
SplunkTrust

One option could be to have serial no in the lookup file itself or add serial no in subsearch and search based on it.

|inputlookup lookupb.csv | eval sno=1 | accum sno | where sno >= yourlowerlimit AND sno <= yourupperlimit

Also, consider option to increase the limit value in limits.conf so that there are less no of breakups.

Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 2 releases of new security content via the ...

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...