<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: subsearch is truncating the results with join command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505302#M141193</link>
    <description>&lt;LI-CODE lang="markup"&gt;index=test_index (ip="83.136.24.154" sourcetype=audit_log event=Attempt NOT messagetype=Request NOT status=failure) OR (sourcetype=server_log "validator.Credential") 
| rex field=idDetails "id\:(?&amp;lt;id&amp;gt;.*)" 
| rex field=_raw "id\:(?&amp;lt;id&amp;gt;[^\s]+)" 
| rex field=_raw "mytemp\s(?&amp;lt;message&amp;gt;.*)$" 
| rex field=_raw "user\s\[?(?&amp;lt;username&amp;gt;[^\]]+)" 
| eval username=coalesce(username,subject)
| stats min(_time) as _time values(status) as status dc(sourcetype) as flag values(message) as message by id,username
| where flag &amp;gt; 1
| eval successful_login=if(status="success", "Yes", "No") 
| table _time,username,successful_login,message&lt;/LI-CODE&gt;&lt;P&gt;If &lt;STRONG&gt;join&amp;nbsp;&lt;/STRONG&gt;can't work, try&amp;nbsp;&lt;STRONG&gt;stats&lt;/STRONG&gt;.&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jun 2020 01:28:56 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-06-20T01:28:56Z</dc:date>
    <item>
      <title>Why is subsearch truncating the results with join command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505170#M141163</link>
      <description>&lt;P&gt;Hi, I am trying to join 2 searches with produce some results but I am getting this error which says -&amp;nbsp; "subsearch produced 50000 results truncating to 50000".&lt;/P&gt;
&lt;P&gt;I can't change the limits.conf so is there any other way to get the stats without using join.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my search -&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=test_index ip="83.136.24.154" sourcetype=audit_log event=Attempt NOT messagetype=Request NOT status=failure 
| rex field=idDetails "id\:(?&amp;lt;id&amp;gt;.*)" 
| eval successful_login=if(status == "success", "Yes", "No") 
| rename subject AS username 
| join type=left id username 
    [ search index=test_index sourcetype=server_log "validator.Credential" 
    | rex field=_raw "id\:(?&amp;lt;id&amp;gt;[^\s]+)" 
    | rex field=_raw "mytemp\s(?&amp;lt;message&amp;gt;.*)$" 
    | rex field=_raw "user\s\[?(?&amp;lt;username&amp;gt;[^\]]+)" 
    | fields id,message,username] 
| table _time,username,successful_login,message&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if someone can advice.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 16:52:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505170#M141163</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2023-08-28T16:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch is truncating the results with join command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505174#M141165</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222349"&gt;@shashank_24&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The only way it update limits.conf and it isn't a good idea, but you could have a different approach,.&lt;/P&gt;&lt;P&gt;You could use &lt;STRONG&gt;stats&lt;/STRONG&gt; creating something like this (I cannot test your search, but see my approach):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=test_index sourcetype=audit_log event=Attempt NOT messagetype=Request NOT status=failure) OR (index=test_index sourcetype=server_log "validator.Credential")
| rex field=idDetails "id\:(?&amp;lt;id&amp;gt;.*)" 
| rex "id\:(?&amp;lt;id&amp;gt;[^\s]+)" 
| rex "mytemp\s(?&amp;lt;message&amp;gt;.*)$" 
| rex "user\s\[?(?&amp;lt;username&amp;gt;[^\]]+)" 
| eval successful_login=if(status="success", "Yes", "No") 
| rename subject AS username 
| stats earliest(_time) AS _time values(successful_login) AS successful_login values(message) AS message BY id username 
| table _time,username,successful_login,message&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 12:15:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505174#M141165</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-06-19T12:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch is truncating the results with join command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505209#M141176</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;Thanks for the response but it's not working. Actually there is an ip address in the 1st search I forgot to mention. (updated the original query) and I want it to narrow down the results to that IP but all the results are coming.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 15:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505209#M141176</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2020-06-19T15:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch is truncating the results with join command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505302#M141193</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=test_index (ip="83.136.24.154" sourcetype=audit_log event=Attempt NOT messagetype=Request NOT status=failure) OR (sourcetype=server_log "validator.Credential") 
| rex field=idDetails "id\:(?&amp;lt;id&amp;gt;.*)" 
| rex field=_raw "id\:(?&amp;lt;id&amp;gt;[^\s]+)" 
| rex field=_raw "mytemp\s(?&amp;lt;message&amp;gt;.*)$" 
| rex field=_raw "user\s\[?(?&amp;lt;username&amp;gt;[^\]]+)" 
| eval username=coalesce(username,subject)
| stats min(_time) as _time values(status) as status dc(sourcetype) as flag values(message) as message by id,username
| where flag &amp;gt; 1
| eval successful_login=if(status="success", "Yes", "No") 
| table _time,username,successful_login,message&lt;/LI-CODE&gt;&lt;P&gt;If &lt;STRONG&gt;join&amp;nbsp;&lt;/STRONG&gt;can't work, try&amp;nbsp;&lt;STRONG&gt;stats&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 01:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505302#M141193</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-20T01:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch is truncating the results with join command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505313#M141197</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222349"&gt;@shashank_24&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as I said, I cannot test the search because I haven't your data, but I'd like to pass you the approach: instead join (with one or more keys) use a stats approach (as also&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;is suggesting):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(main_search) OR (subsearch)
| all the eval and rex you need
| stats values(all_the_fields_you_need) AS field_name BY key1 key2
| table all the fields &lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 06:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505313#M141197</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-06-20T06:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch is truncating the results with join command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505459#M141251</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;Thank you so much. You guys are stars. After tweaking both query worked for me. I have used the one which&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;has mentioned with Stats so I will accept it.&lt;/P&gt;&lt;P&gt;Again thanks to both of you.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 10:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/505459#M141251</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2020-06-22T10:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch is truncating the results with join command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/555841#M157827</link>
      <description>&lt;P&gt;Adding &lt;STRONG&gt;max=0&lt;/STRONG&gt; will show all the events&lt;BR /&gt;for eg.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| join type=left id username max=0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222349"&gt;@shashank_24&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 17:56:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/555841#M157827</guid>
      <dc:creator>ashvinpandey</dc:creator>
      <dc:date>2021-06-15T17:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch is truncating the results with join command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/655768#M226503</link>
      <description>&lt;P&gt;What will be the solution if we are trying to join two savedsearches . How could we avoid the truncate issue .&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to join two saved searches , but I cant able to combine two saved searches without join command . Could you please help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;query is :&lt;BR /&gt;&lt;BR /&gt;|loadjob savedsearch="admin:command_center:datamodel_search"&lt;/P&gt;&lt;P&gt;|search status!=Resolved AND status!=closed AND status!=cancelled&lt;/P&gt;&lt;P&gt;|join type=left inc_id&lt;/P&gt;&lt;P&gt;[|loadjob savedsearch ="admin:command_center:sev_datamodel_search"&lt;/P&gt;&lt;P&gt;|search sla_status="Completed" AND sla_type="Hold" AND flag=1&lt;/P&gt;&lt;P&gt;|stats sum(sla_time) as sla_complete by inc_id]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 06:24:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-subsearch-truncating-the-results-with-join-command/m-p/655768#M226503</guid>
      <dc:creator>Lavender</dc:creator>
      <dc:date>2023-08-28T06:24:26Z</dc:date>
    </item>
  </channel>
</rss>

