Splunk Search

subsearch limit

akawacz
Path Finder

Hi,

How can i overcome subsearch limitation. I do not want to change limit in conf files. I have read that this can cause instability.

In my below search I want to find differences between two data sets. My subsearch is returing just 50.000 rows that is why search not working properly

index=A  earliest=-45d@| dedup IM_ID
|eval TYPE_OF_REPORT="Y"
|eval HASH=md5(ifnull(ASSIGNEE,"Empty").ifnull(ID,"Empty")
| table ID ASSIGNEE HASH  TYPE_OF_REPORT
|append [search index = B|eval TYPE_OF_REPORT="X"| table  ID ASSIGNEE HASH  TYPE_OF_REPORT] |stats values(*) AS * dc(TYPE_OF_REPORT) as t by HASH |where t=1 and match(TYPE_OF_REPORT,"Y").

Thanks

0 Karma
1 Solution

sundareshr
Legend

How about something like this (not tested)

(index-A OR index=B) | dedup IM_ID index
| eval hash=md5(ifnull(ASSIGNEE,"Empty").ifnull(ID,"Empty")
| streamstats window=1 list(eval(if(index="A", "Y", "X"))) as TYPE_OF_REPORT by index
| table ID ASSIGNEE HASH TYPE_OF_REPORT
| stats values(*) as * dc(TYPE_OF_REPORT) as t by hash
| where t=1 and match(TYPE_OF_REPORT, "Y")

View solution in original post

0 Karma

sundareshr
Legend

How about something like this (not tested)

(index-A OR index=B) | dedup IM_ID index
| eval hash=md5(ifnull(ASSIGNEE,"Empty").ifnull(ID,"Empty")
| streamstats window=1 list(eval(if(index="A", "Y", "X"))) as TYPE_OF_REPORT by index
| table ID ASSIGNEE HASH TYPE_OF_REPORT
| stats values(*) as * dc(TYPE_OF_REPORT) as t by hash
| where t=1 and match(TYPE_OF_REPORT, "Y")
0 Karma

akawacz
Path Finder

Hi

You gave me idea with combaning indexs by OR.

I have used eval with If instead of streamstats.

eval TYPE_OF_REPORT=if(index=="A","X","Y")

Thank you

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