<?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 do I reset the CSV sourcetype counter? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148923#M30331</link>
    <description>&lt;P&gt;I may have accepted too soon... when I try to run that command, I get the following error:&lt;/P&gt;

&lt;P&gt;Error in 'delete' command: This command cannot be invoked after the non-streaming command 'metadata'.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Feb 2015 13:51:20 GMT</pubDate>
    <dc:creator>adam_reber</dc:creator>
    <dc:date>2015-02-23T13:51:20Z</dc:date>
    <item>
      <title>How do I reset the CSV sourcetype counter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148919#M30327</link>
      <description>&lt;P&gt;I have a sourcetype, called "test_csv" that I have been testing out various CSV settings with.  The file header has changed a bit over time, so I currently end up getting "sourcetype=test_csv-5" as my sourcetype.  Is there a way to clear out Splunk's knowledge of old CSV headers for this sourcetype, so that it will bring in new events as "test_csv" without any numerical suffix?  I know I can use sourcetype renaming, but I'd like to clear out the underlying issue rather than cover it up.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:59:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148919#M30327</guid>
      <dc:creator>adam_reber</dc:creator>
      <dc:date>2020-09-28T18:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reset the CSV sourcetype counter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148920#M30328</link>
      <description>&lt;P&gt;You can try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata sourcetypes | delete
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope it helps&lt;/P&gt;

&lt;P&gt;Please be aware that this will delete all of the sourcetype records, you can filter it down by including more parameters after the metadata sourcetypes, such as sourcetype=test_csv &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata sourcetypes | search sourcetype=test_csv* | delete
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Feb 2015 12:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148920#M30328</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-23T12:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reset the CSV sourcetype counter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148921#M30329</link>
      <description>&lt;P&gt;Awesome, thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 13:07:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148921#M30329</guid>
      <dc:creator>adam_reber</dc:creator>
      <dc:date>2015-02-23T13:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reset the CSV sourcetype counter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148922#M30330</link>
      <description>&lt;P&gt;Please accept the answer and vote up so that others who experience the same issue can easily locate the correct answer.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 13:14:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148922#M30330</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-23T13:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reset the CSV sourcetype counter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148923#M30331</link>
      <description>&lt;P&gt;I may have accepted too soon... when I try to run that command, I get the following error:&lt;/P&gt;

&lt;P&gt;Error in 'delete' command: This command cannot be invoked after the non-streaming command 'metadata'.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 13:51:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148923#M30331</guid>
      <dc:creator>adam_reber</dc:creator>
      <dc:date>2015-02-23T13:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reset the CSV sourcetype counter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148924#M30332</link>
      <description>&lt;P&gt;Not to worry, &lt;BR /&gt;
try using this instead in props.conf&lt;BR /&gt;
[old_sourcetype] rename = new_sourcetype]&lt;/P&gt;

&lt;P&gt;This will rename your existing sourcetypes with one sourcetype, meaning you don't have to delete it.&lt;/P&gt;

&lt;P&gt;Let me know if it works&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148924#M30332</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2020-09-28T18:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I reset the CSV sourcetype counter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148925#M30333</link>
      <description>&lt;P&gt;Alternatively,&lt;BR /&gt;
Sourcetypes only exist if data are set with them, unless they are defined in props.conf.&lt;/P&gt;

&lt;P&gt;So delete all indexed data, using;&lt;BR /&gt;
    sourcetype=test_csv* | delete&lt;BR /&gt;
Then re-index it, setting your sourcetype of your input to test_csv&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:59:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-reset-the-CSV-sourcetype-counter/m-p/148925#M30333</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2020-09-28T18:59:37Z</dc:date>
    </item>
  </channel>
</rss>

