<?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: How to combine two searches with streaming commands? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604387#M210228</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;after putting the result in a table, the result is OK &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For completeness, this now shows correct results:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;index="sli-index" 
    | eval testtype="endp-health" 
    |  head 3 
| append 
    [search index="sli-index"
    | eval testtype="enp-system" 
    | head 6]
| table _time, testtype&lt;/LI-CODE&gt;&lt;P&gt;Many Thanks, you saved my day.&lt;/P&gt;&lt;P&gt;Cheers, Martin&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jul 2022 06:08:20 GMT</pubDate>
    <dc:creator>mgutschelhofer</dc:creator>
    <dc:date>2022-07-05T06:08:20Z</dc:date>
    <item>
      <title>How to combine two searches with streaming commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604374#M210219</link>
      <description>&lt;P&gt;I want to combine two search results, whereby I'm only interested in the last x/y events from each subquery. Something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;| multisearch 
    [search index="sli-index" 
    | eval testtype="endp-health" 
    |  head 3] 
    [search index="sli-index"
    | eval testtype="enp-system" 
    | head 6]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This leads to following error:&amp;nbsp;&lt;EM&gt;...&lt;SPAN&gt;Error in 'multisearch' command: Multisearch subsearches might only contain purely streaming operations (subsearch 1 contains a non-streaming command)....&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Any idea how this can be achieved?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 05:19:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604374#M210219</guid>
      <dc:creator>mgutschelhofer</dc:creator>
      <dc:date>2022-07-05T05:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two searches with streaming commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604375#M210220</link>
      <description>&lt;P&gt;Now that's interesting because all comands are streaming. Maybe Splunk tried to optimize the search and came up with some non-streaming equivalent and shot itself in the foot. Anyway. If your subsearches are small and quick you can use append.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 05:25:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604375#M210220</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-07-05T05:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two searches with streaming commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604378#M210221</link>
      <description>&lt;P&gt;I tried with append:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;index="sli-index" 
    | eval testtype="endp-health" 
    |  head 1 
| append 
    [search index="sli-index"
    | eval testtype="enp-system" 
    | head 1]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But for some reasons I get two events where testtype=="endp-system".&lt;/P&gt;&lt;P&gt;Expected: I get two events: testtype="endp-health" and the other with testtype="endp-system"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 05:34:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604378#M210221</guid>
      <dc:creator>mgutschelhofer</dc:creator>
      <dc:date>2022-07-05T05:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two searches with streaming commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604384#M210226</link>
      <description>&lt;P&gt;Strange. Works for me.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_20220705-075641_Firefox Beta.png" style="width: 2048px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20394iDE6537176AE0FE8F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot_20220705-075641_Firefox Beta.png" alt="Screenshot_20220705-075641_Firefox Beta.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 05:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604384#M210226</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-07-05T05:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two searches with streaming commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604387#M210228</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;after putting the result in a table, the result is OK &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For completeness, this now shows correct results:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;index="sli-index" 
    | eval testtype="endp-health" 
    |  head 3 
| append 
    [search index="sli-index"
    | eval testtype="enp-system" 
    | head 6]
| table _time, testtype&lt;/LI-CODE&gt;&lt;P&gt;Many Thanks, you saved my day.&lt;/P&gt;&lt;P&gt;Cheers, Martin&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 06:08:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/604387#M210228</guid>
      <dc:creator>mgutschelhofer</dc:creator>
      <dc:date>2022-07-05T06:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two searches with streaming commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/687890#M234601</link>
      <description>&lt;P&gt;Hello Splunk Community,&lt;/P&gt;&lt;P&gt;To combine two search results where you are interested in the last x/y events from each subquery, you can utilize streaming commands effectively by piping the output of the first search into the second one. For instance, you can use command-line tools like grep, awk, or sed to filter and merge the results. If you're dealing with more complex data, consider using a programming language like Python with libraries such as pandas for better manipulation and merging of search results. Finally, to enhance your streaming and searching experience, I recommend you install the Spotify Web Mod PC. This mod can help streamline your music searches and organize your playlists efficiently, providing a seamless integration into your overall workflow.&lt;/P&gt;&lt;P&gt;Best Regards!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 14:41:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-two-searches-with-streaming-commands/m-p/687890#M234601</guid>
      <dc:creator>jolenescott</dc:creator>
      <dc:date>2024-05-17T14:41:57Z</dc:date>
    </item>
  </channel>
</rss>

