<?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 Is it possible to use multiple collects to send data to different indexes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-multiple-collects-to-send-data-to/m-p/589196#M205190</link>
    <description>&lt;P&gt;Is it possible to use the collect function to send data to multiple different summary indexes?&lt;BR /&gt;&lt;BR /&gt;For example, let's say my search produces the following results:&lt;/P&gt;
&lt;PRE&gt;date         org         field1   field2    field3&lt;BR /&gt;03-15-22     Finance     valueA1  ValueA2   ValueA3&lt;BR /&gt;03-15-22     Maintenance valueB1  ValueB2   ValueB3        &lt;/PRE&gt;
&lt;P&gt;I want to use collect to send the results for&lt;STRONG&gt; org:Finance&lt;/STRONG&gt; to a specific summary &lt;STRONG&gt;index = FinanceSummary&lt;/STRONG&gt; and similarly send the results for &lt;STRONG&gt;org:Maintenance&lt;/STRONG&gt; to another summary &lt;STRONG&gt;index=MaintenanceSummary&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The syntax I have for the collect function was:&lt;/P&gt;
&lt;PRE&gt;|collect index=[the target summary index]&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;My question is there way I can do something like:&lt;/P&gt;
&lt;PRE&gt;| where org=Finance&lt;BR /&gt;| collect index=FinanceSummary&lt;BR /&gt;| where org=Maintenance&lt;BR /&gt;| collect index=MaintenanceSummary&lt;/PRE&gt;
&lt;P&gt;I was not sure if this was possible and was hoping to check before pollute my summary indexes with bad results. The documentation itself does not explicitly address this question unfortunately&amp;nbsp;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Collect" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Collect&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2022 14:37:40 GMT</pubDate>
    <dc:creator>moses_meniscus</dc:creator>
    <dc:date>2022-03-16T14:37:40Z</dc:date>
    <item>
      <title>Is it possible to use multiple collects to send data to different indexes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-multiple-collects-to-send-data-to/m-p/589196#M205190</link>
      <description>&lt;P&gt;Is it possible to use the collect function to send data to multiple different summary indexes?&lt;BR /&gt;&lt;BR /&gt;For example, let's say my search produces the following results:&lt;/P&gt;
&lt;PRE&gt;date         org         field1   field2    field3&lt;BR /&gt;03-15-22     Finance     valueA1  ValueA2   ValueA3&lt;BR /&gt;03-15-22     Maintenance valueB1  ValueB2   ValueB3        &lt;/PRE&gt;
&lt;P&gt;I want to use collect to send the results for&lt;STRONG&gt; org:Finance&lt;/STRONG&gt; to a specific summary &lt;STRONG&gt;index = FinanceSummary&lt;/STRONG&gt; and similarly send the results for &lt;STRONG&gt;org:Maintenance&lt;/STRONG&gt; to another summary &lt;STRONG&gt;index=MaintenanceSummary&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The syntax I have for the collect function was:&lt;/P&gt;
&lt;PRE&gt;|collect index=[the target summary index]&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;My question is there way I can do something like:&lt;/P&gt;
&lt;PRE&gt;| where org=Finance&lt;BR /&gt;| collect index=FinanceSummary&lt;BR /&gt;| where org=Maintenance&lt;BR /&gt;| collect index=MaintenanceSummary&lt;/PRE&gt;
&lt;P&gt;I was not sure if this was possible and was hoping to check before pollute my summary indexes with bad results. The documentation itself does not explicitly address this question unfortunately&amp;nbsp;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Collect" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Collect&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 14:37:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-multiple-collects-to-send-data-to/m-p/589196#M205190</guid>
      <dc:creator>moses_meniscus</dc:creator>
      <dc:date>2022-03-16T14:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use multiple collects to send data to different indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-multiple-collects-to-send-data-to/m-p/589236#M205198</link>
      <description>&lt;P&gt;This won't work, not because of the multiple collects, which should work, but because the first where command will remove everything apart from org=Finance, so when the second where command removes everything apart from org=Maintenance, there will be no results left (since the org=Maintenance events were removed by the first where command).&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 07:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-multiple-collects-to-send-data-to/m-p/589236#M205198</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-16T07:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use multiple collects to send data to different indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-multiple-collects-to-send-data-to/m-p/589322#M205219</link>
      <description>&lt;P&gt;Thanks for the reply! That makes perfect sense. Someone outside of this channel suggested I try a foreach loop. But thanks for confirming my original question!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 13:16:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-multiple-collects-to-send-data-to/m-p/589322#M205219</guid>
      <dc:creator>moses_meniscus</dc:creator>
      <dc:date>2022-03-16T13:16:32Z</dc:date>
    </item>
  </channel>
</rss>

