<?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: Why my subsearch is not working? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592444#M206200</link>
    <description>&lt;P&gt;How many events does the subquery process? Do you have any messages in job inspector about the subsearch being truncated?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2022 13:59:52 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-04-05T13:59:52Z</dc:date>
    <item>
      <title>Why my subsearch is not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592436#M206198</link>
      <description>&lt;P&gt;I am parsing logs using splunk and there are two types of logs :&lt;/P&gt;&lt;P&gt;1. API endpoint info and user ID&lt;/P&gt;&lt;P&gt;2. Logs which contains specific error that I am interested in.(Lets say error is ERROR_FAIL)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need all logs for a particular user hitting endpoint and getting ERROR_FAIL.&lt;/P&gt;&lt;P&gt;Both the logs have same request id for one instance of api call.&lt;/P&gt;&lt;P&gt;So firstly I want to filter the request ID from point 1, which will give me request id for the api and user I am interested in, and based on that request id ,I wana see all the logs that have failed because of error(ERROR_FAIL).&lt;/P&gt;&lt;P&gt;Now If i use following query ,I get all the request ids for user and API:&lt;/P&gt;&lt;P&gt;index=app-Prod sourcetype=prod-app-logs "api/rest/v1/entity" " 123" | table xrid&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I add this in sub-search. it does not work:Final query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=app-Prod sourcetype=prod-app-logs&amp;nbsp; [search index=app-Prod sourcetype=prod-app-logs "api/rest/v1/entity" "123" | table xrid]&amp;nbsp; "ERROR_FAIL"&amp;nbsp; |&amp;nbsp; table xrid&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not return anything.&lt;/P&gt;&lt;P&gt;There are logs where 123 user hits&amp;nbsp;"api/rest/v1/entity" and gets&amp;nbsp;"ERROR_FAIL".How can i make my query correct?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 13:51:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592436#M206198</guid>
      <dc:creator>user9025</dc:creator>
      <dc:date>2022-04-05T13:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why my subsearch is not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592444#M206200</link>
      <description>&lt;P&gt;How many events does the subquery process? Do you have any messages in job inspector about the subsearch being truncated?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 13:59:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592444#M206200</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-05T13:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why my subsearch is not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592470#M206209</link>
      <description>&lt;P&gt;Subquery should return lot of event may be 500Kapprox.I dont see data getting truncated.I see success message once query completes.I reduced time stamp, now subquery returns 70k, still not working,&lt;/P&gt;&lt;P&gt;For eg:&lt;/P&gt;&lt;P&gt;index=app-Prod sourcetype=&lt;SPAN&gt;prod-app-logs&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; "*api/rest/v1/entity*" "&lt;SPAN class=""&gt;987edf3s&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;I see following result:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt; [&lt;SPAN class=""&gt;2022-04-05T05:30:44&lt;/SPAN&gt;,&lt;SPAN class=""&gt;457&lt;/SPAN&gt;] [&lt;SPAN class=""&gt;app-b2.in.abc.com:ajp-nio-0.0.0.0-8009-exec-56:220405053043920.696&lt;/SPAN&gt;] [&lt;SPAN class=""&gt;apid=1234567&lt;/SPAN&gt;] [&lt;SPAN class=""&gt;xrid=987edf3s&lt;/SPAN&gt;] (&lt;SPAN class=""&gt;ApiLoggingFilter.logTheApiAnalyticsData:421&lt;/SPAN&gt;) &lt;SPAN class=""&gt;REST&lt;/SPAN&gt; &lt;SPAN class=""&gt;API&lt;/SPAN&gt; &lt;SPAN class=""&gt;Usage&lt;/SPAN&gt; &lt;SPAN class=""&gt;Tracking&lt;/SPAN&gt; &lt;SPAN class=""&gt;Data.&lt;/SPAN&gt; &lt;SPAN class=""&gt;REST&lt;/SPAN&gt; &lt;SPAN class=""&gt;EndPoint&lt;/SPAN&gt; &lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;GET&lt;/SPAN&gt; &lt;SPAN class=""&gt;/entity&lt;/SPAN&gt; &amp;nbsp;; &lt;SPAN class=""&gt;ApiUser&lt;/SPAN&gt; &lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;User&lt;/SPAN&gt;[12345] ;&amp;nbsp;&lt;SPAN class=""&gt;UserAgent&lt;/SPAN&gt; &lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;curl/7.66.0&lt;/SPAN&gt; ; &lt;SPAN class=""&gt;RemoteHost&lt;/SPAN&gt; &lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;123.234.567.89&lt;/SPAN&gt; ; &lt;SPAN class=""&gt;RequestURL&lt;/SPAN&gt; &lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;A href="https://server/api/rest/v1/entity" target="_blank" rel="noopener"&gt;https://server/api/rest/v1/entity&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i try to move this to inner query and I have following query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=app-Prod sourcetype=&lt;SPAN&gt;prod-app-logs&lt;/SPAN&gt;[search iindex=app-Prod sourcetype=&lt;SPAN&gt;prod-app-logs&lt;/SPAN&gt; ""*api/rest/v1/entity*" "12345" | table xrid]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expect that it should show me logs with xrid=&lt;SPAN class=""&gt;987edf3s But it is not showing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Time to run both above was last 24 hours. What am I missing&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 15:27:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592470#M206209</guid>
      <dc:creator>user9025</dc:creator>
      <dc:date>2022-04-05T15:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why my subsearch is not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592478#M206212</link>
      <description>&lt;P&gt;If the subquery has too many events (and 500K definitely sounds like too many), the subquery doesn't return the events it is supposed to so the primary query doesn't get filtered.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 15:45:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592478#M206212</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-05T15:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why my subsearch is not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592479#M206213</link>
      <description>&lt;P&gt;As i told in comment, i ran for last 1 day with inly 70k records. Still its not working.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 15:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592479#M206213</guid>
      <dc:creator>user9025</dc:creator>
      <dc:date>2022-04-05T15:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why my subsearch is not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592481#M206214</link>
      <description>&lt;P&gt;Even 70k is too many - I think the limit might be 50k - try with a smaller set&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 15:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-my-subsearch-is-not-working/m-p/592481#M206214</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-05T15:50:42Z</dc:date>
    </item>
  </channel>
</rss>

