<?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 is collect command not working? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487607#M4367</link>
    <description>&lt;P&gt;Are you getting any error message or anything?  What happens after you hit the above command.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Nov 2019 17:08:04 GMT</pubDate>
    <dc:creator>uagrawal_splunk</dc:creator>
    <dc:date>2019-11-20T17:08:04Z</dc:date>
    <item>
      <title>Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487604#M4364</link>
      <description>&lt;P&gt;I have an instance of Splunk Enterprise installed where my search head and indexer are running on the same server.  I installed and configured the Splunk Forwarder for Windows on a Windows server with a syntax error causing events to be sent to an incorrect index.   I tried following the support articles for using the "collect" command to copy events from one index to another but that does not seem to be working.  Additionally I double checked the syntax of the collect command directly from the Splunk documentation for the collect command and it appears to be correct.  However, when I run the following search and collect my data is not copied to the destination index:&lt;/P&gt;

&lt;P&gt;host="hostname" sourcetype="source_type" index="source_index" | collect index="destination_index" sourcetype="source_type" host="hostname"&lt;/P&gt;

&lt;P&gt;For my particular use case, my host and sourcetype should be the same for the data in the source and destination index.  I only with to copy the events to the new destination index where after I will delete them from the original index.&lt;/P&gt;

&lt;P&gt;Is there anything I am missing here?  Thanks and please let me know if anyone has any insight!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:01:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487604#M4364</guid>
      <dc:creator>rschmelzle_noda</dc:creator>
      <dc:date>2020-09-30T03:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487605#M4365</link>
      <description>&lt;P&gt;Have you created your destination_index in the indexer? I tried the same query of yours and it works for me, the events are copied to my new destination_index. &lt;BR /&gt;
If the destination_index is not available then you will get below message :&lt;BR /&gt;
Received event for unconfigured/disabled/deleted index='test' with source="source" host="my_host" sourcetype="my_sourcetype". So far received events from 1 missing index(es).&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:02:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487605#M4365</guid>
      <dc:creator>uagrawal_splunk</dc:creator>
      <dc:date>2020-09-30T03:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487606#M4366</link>
      <description>&lt;P&gt;Thanks for the reply.  When I got to Settings --&amp;gt; Data --&amp;gt; Indexes my index is present.  Any other thoughts or suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 16:58:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487606#M4366</guid>
      <dc:creator>rschmelzle_noda</dc:creator>
      <dc:date>2019-11-20T16:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487607#M4367</link>
      <description>&lt;P&gt;Are you getting any error message or anything?  What happens after you hit the above command.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 17:08:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487607#M4367</guid>
      <dc:creator>uagrawal_splunk</dc:creator>
      <dc:date>2019-11-20T17:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487608#M4368</link>
      <description>&lt;P&gt;When I run it nothing happens at all.  I run it in the search box from the web UI and nothing at all happens.  Upon searching for the events that should be copied in the destination index I do not see them.  I do still see the events in the source index untouched.&lt;/P&gt;

&lt;P&gt;Maybe I ran it with a small syntax error?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 17:10:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487608#M4368</guid>
      <dc:creator>rschmelzle_noda</dc:creator>
      <dc:date>2019-11-20T17:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487609#M4369</link>
      <description>&lt;P&gt;I don't think there is a syntax error.&lt;BR /&gt;
Because this query works for me. I am seeing events on my new_index. I used below query: &lt;BR /&gt;
host="host_name" sourcetype="My_sourcetype" index="test" | collect index="new_index" host="host_name" sourcetype="My_sourcetype"&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487609#M4369</guid>
      <dc:creator>uagrawal_splunk</dc:creator>
      <dc:date>2020-09-30T03:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487610#M4370</link>
      <description>&lt;P&gt;Thanks, I may have typed it in wrong the first time, but I will try it again and see if it works.   I appreciate your feedback! &lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 20:11:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487610#M4370</guid>
      <dc:creator>rschmelzle_noda</dc:creator>
      <dc:date>2019-11-20T20:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487611#M4371</link>
      <description>&lt;P&gt;Are you able to copy the data in the destination index?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 15:36:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487611#M4371</guid>
      <dc:creator>uagrawal_splunk</dc:creator>
      <dc:date>2019-11-22T15:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487612#M4372</link>
      <description>&lt;P&gt;Yes, I had incorrectly formatted my original search and collect.  After looking back through my documentation there was a small syntax error in the initial execution of my command causing the issue.&lt;/P&gt;

&lt;P&gt;Thanks for your help and sorry for the silly mistake!  &lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 15:51:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487612#M4372</guid>
      <dc:creator>rschmelzle_noda</dc:creator>
      <dc:date>2019-11-22T15:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487613#M4373</link>
      <description>&lt;P&gt;No problem, I am writing the collect command in answers for others.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 16:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487613#M4373</guid>
      <dc:creator>uagrawal_splunk</dc:creator>
      <dc:date>2019-11-22T16:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487614#M4374</link>
      <description>&lt;P&gt;The collect command stated in the question is correct and it will indexed the data in new index:&lt;BR /&gt;
host="host_name" sourcetype="My_sourcetype" index="test" | collect index="new_index" host="host_name" sourcetype="My_sourcetype"&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:03:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487614#M4374</guid>
      <dc:creator>uagrawal_splunk</dc:creator>
      <dc:date>2020-09-30T03:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487615#M4375</link>
      <description>&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 16:02:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487615#M4375</guid>
      <dc:creator>rschmelzle_noda</dc:creator>
      <dc:date>2019-11-22T16:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why is collect command not working?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487616#M4376</link>
      <description>&lt;P&gt;No problem. Glad to help.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 17:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-collect-command-not-working/m-p/487616#M4376</guid>
      <dc:creator>uagrawal_splunk</dc:creator>
      <dc:date>2019-11-22T17:11:19Z</dc:date>
    </item>
  </channel>
</rss>

