<?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: events not deleting with | delete in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65285#M13104</link>
    <description>&lt;P&gt;Since you "desperately" want the data out of the index then you should be able to put some extra work and try this:&lt;BR /&gt;
Export the data that you care for, csv format. Watch out for the size (rows) of the csv file.&lt;BR /&gt;
Once you are sure you have all your data that you care for, roll the index and back up your data.
Then, clean all the data for the index using the clean command for this index.  &lt;/P&gt;

&lt;P&gt;Then use inputcsv to get the data back into this clean index. Note again, only 10k data will be imported at once, so you will need to use a little trick to get the data in again.&lt;BR /&gt;
see &lt;A href="http://blogs.splunk.com/2009/08/07/help-i-cant-export-more-than-10000-events/" rel="nofollow"&gt;THIS&lt;/A&gt; for more info on importing large CSV files.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Oct 2010 06:28:56 GMT</pubDate>
    <dc:creator>Genti</dc:creator>
    <dc:date>2010-10-07T06:28:56Z</dc:date>
    <item>
      <title>events not deleting with | delete</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65283#M13102</link>
      <description>&lt;P&gt;I want to clear out information from a source that had bad information indexed, so I am trying to do a &lt;CODE&gt;sourcetype=source | delete&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;I do have can_delete role, the search deleted about 300,000 events, but there are 43 errors. &lt;/P&gt;

&lt;P&gt;splunk_server   index   deleted     errors&lt;BR /&gt;
1   splunkserver    &lt;STRONG&gt;ALL&lt;/STRONG&gt; 304232  43&lt;BR /&gt;
2   splunkserver main   304232    &lt;/P&gt;

&lt;P&gt;When I try the normal search, I still get the 43 events showing up. Re-running the delete command just comes back with the same 43 errors.&lt;/P&gt;

&lt;P&gt;unfortunately, I can't clean the index that has this data. I still need some data from another source in that index.&lt;/P&gt;

&lt;P&gt;If I try to drill down into the 43 errors, Splunk opens a new window with a flashtimeline and no search.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2010 21:47:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65283#M13102</guid>
      <dc:creator>tawollen</dc:creator>
      <dc:date>2010-10-06T21:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: events not deleting with | delete</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65284#M13103</link>
      <description>&lt;P&gt;Interesting thing I found is that I had tried sending these events in as different sourcetypes, so the events (300,000)  have been in Splunk as both "Type1" and "Type2".. When I do the | delete on Type2 I get the same errors. It turns out it looks like it the same 43 events will not delete out of either sourcetype. &lt;/P&gt;

&lt;P&gt;This was a CSV file that was indexed, and the data source CSV file doesn't look strange for those lines that won't delete.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2010 22:15:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65284#M13103</guid>
      <dc:creator>tawollen</dc:creator>
      <dc:date>2010-10-06T22:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: events not deleting with | delete</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65285#M13104</link>
      <description>&lt;P&gt;Since you "desperately" want the data out of the index then you should be able to put some extra work and try this:&lt;BR /&gt;
Export the data that you care for, csv format. Watch out for the size (rows) of the csv file.&lt;BR /&gt;
Once you are sure you have all your data that you care for, roll the index and back up your data.
Then, clean all the data for the index using the clean command for this index.  &lt;/P&gt;

&lt;P&gt;Then use inputcsv to get the data back into this clean index. Note again, only 10k data will be imported at once, so you will need to use a little trick to get the data in again.&lt;BR /&gt;
see &lt;A href="http://blogs.splunk.com/2009/08/07/help-i-cant-export-more-than-10000-events/" rel="nofollow"&gt;THIS&lt;/A&gt; for more info on importing large CSV files.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2010 06:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65285#M13104</guid>
      <dc:creator>Genti</dc:creator>
      <dc:date>2010-10-07T06:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: events not deleting with | delete</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65286#M13105</link>
      <description>&lt;P&gt;You can use the &lt;CODE&gt;exporttool&lt;/CODE&gt; and &lt;CODE&gt;importtool&lt;/CODE&gt; command line utilities to dump and recreate your index's bucket(s).&lt;/P&gt;

&lt;P&gt;This approach lets you export an entire bucket to a single CSV file.  You can then use a small little csv-processing script (or if your careful, a text editor) to strip out the offending lines before you re-create your bucket.&lt;/P&gt;

&lt;P&gt;The process goes something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cd $SPLUNK_HOME/var/lib/db/your_index
exportool db_xxx_xxx_id export_id.csv -csv
# Edit your export and remove unwanted events
vim export_id.csv
# ...
# Rebuild your bucket
importtool db_xxx_xxx_id.NEW export.csv
mv db_xxx_xxx_id db_xxx_xxx_id.OLD
mv db_xxx_xxx_id.NEW db_xxx_xxx_id
rm export_id.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;WARNING:&lt;/STRONG&gt; This is a potentially dangerous operation, you should backup and understand buckets and have a general idea of how indexing works before you try anything like this.  You could shoot yourself in the foot.  You have been warned.&lt;/P&gt;

&lt;P&gt;BTW, if you are using event/block signing or anything like that, then you shouldn't try to attempt anything like this.&lt;/P&gt;

&lt;P&gt;Also see:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.splunk.com/wiki/Community:Modifying_indexed_data_via_export_and_import" rel="nofollow"&gt;http://www.splunk.com/wiki/Community:Modifying_indexed_data_via_export_and_import&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 07 Oct 2010 07:10:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65286#M13105</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-10-07T07:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: events not deleting with | delete</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65287#M13106</link>
      <description>&lt;P&gt;What's &lt;CODE&gt;importcsv&lt;/CODE&gt;?  There's the search command &lt;CODE&gt;inputcsv&lt;/CODE&gt;, and the command line tool &lt;CODE&gt;importtool&lt;/CODE&gt;.  Do you mean one of those?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2010 07:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65287#M13106</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-10-07T07:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: events not deleting with | delete</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65288#M13107</link>
      <description>&lt;P&gt;yeap, inputcsv editing the answer&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2010 13:14:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65288#M13107</guid>
      <dc:creator>Genti</dc:creator>
      <dc:date>2010-10-08T13:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: events not deleting with | delete</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65289#M13108</link>
      <description>&lt;P&gt;We just left the data in the index and for future tests where we will be deleting data on a regular basis have created a 'test' index. With the test index we can run "./splunk clean eventdata test" that will clean that index completely so we can re-test an import. Having to do a csv export/import is more effort than we wanted to do. I am still not sure why splunk has issues causing errors when deleting (hiding) some data from an index with the | delete.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2010 22:43:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/events-not-deleting-with-delete/m-p/65289#M13108</guid>
      <dc:creator>tawollen</dc:creator>
      <dc:date>2010-11-02T22:43:09Z</dc:date>
    </item>
  </channel>
</rss>

