<?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 delete duplicate logs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300344#M90420</link>
    <description>&lt;PRE&gt;&lt;CODE&gt; &amp;lt;your search for relevant events&amp;gt; | eval eid=_cd | search [&amp;lt;same search for relevant events&amp;gt; | streamstats count by _raw  | search count&amp;gt;1 | eval eid=_cd | fields eid] | delete
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Stolen from here: &lt;A href="https://answers.splunk.com/answers/69924/how-to-delete-duplicate-events.html"&gt;https://answers.splunk.com/answers/69924/how-to-delete-duplicate-events.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 16:32:46 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2017-02-15T16:32:46Z</dc:date>
    <item>
      <title>How to delete duplicate logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300343#M90419</link>
      <description>&lt;P&gt;I've uploaded the same log twice(using drag and drop option in add data) and now when I query I see duplicate results due to this.  How do i delete one copy of the log?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:08:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300343#M90419</guid>
      <dc:creator>prateedshetty</dc:creator>
      <dc:date>2017-02-15T16:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete duplicate logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300344#M90420</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; &amp;lt;your search for relevant events&amp;gt; | eval eid=_cd | search [&amp;lt;same search for relevant events&amp;gt; | streamstats count by _raw  | search count&amp;gt;1 | eval eid=_cd | fields eid] | delete
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Stolen from here: &lt;A href="https://answers.splunk.com/answers/69924/how-to-delete-duplicate-events.html"&gt;https://answers.splunk.com/answers/69924/how-to-delete-duplicate-events.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300344#M90420</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-02-15T16:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete duplicate logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300345#M90421</link>
      <description>&lt;P&gt;There is no log file to delete … your data has been indexed. To get rid of duplicate data from index… you can run a search to identify the duplicate events and pipe it to &lt;CODE&gt;|delete&lt;/CODE&gt; command. &lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Delete"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Delete&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300345#M90421</guid>
      <dc:creator>Yasaswy</dc:creator>
      <dc:date>2017-02-15T16:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete duplicate logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300346#M90422</link>
      <description>&lt;P&gt;You can use the delete command. &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Delete"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Delete&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;If you can write a search that limits the data to one copy, then you can pipe it to the delete command so you won't see both.&lt;/P&gt;

&lt;P&gt;This will only stop you from seeing it, it will not get rid of the data off the indexer.&lt;/P&gt;

&lt;P&gt;You can also clean indexes if one of the copies of data is in a different index than the other you can wipe one of the indexes of all the data in there. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Indexer/RemovedatafromSplunk#Remove_data_from_one_or_all_indexes"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/Indexer/RemovedatafromSplunk#Remove_data_from_one_or_all_indexes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:33:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300346#M90422</guid>
      <dc:creator>kmccririe_splun</dc:creator>
      <dc:date>2017-02-15T16:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete duplicate logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300347#M90423</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search That Shows Duplicates AND NOTHING ELSE | dedup _raw | delete
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You will probably have to extend your user's role/permissions to run the &lt;CODE&gt;delete&lt;/CODE&gt; command.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2017 01:49:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300347#M90423</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-02-19T01:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete duplicate logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300348#M90424</link>
      <description>&lt;P&gt;this search is very slowly&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 06:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/300348#M90424</guid>
      <dc:creator>bestSplunker</dc:creator>
      <dc:date>2018-05-17T06:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete duplicate logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/597614#M208073</link>
      <description>&lt;P&gt;I use something like this :&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;your search&amp;gt;
| streamstats count by _raw
| where count&amp;gt;1
| eval eid=_cd
| table eid
| streamstats count
| outputlookup delete_dupplicate_byeid.csv.gz&lt;/LI-CODE&gt;&lt;P&gt;You select and number your wanted selection.&lt;/P&gt;&lt;P&gt;After you can delete step by step :&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;your search&amp;gt; 
| eval eid=_cd
| search [| inputlookup delete_dupplicate_byeid.csv.gz 
          | eval tmp=0 |  where count&amp;gt;=tmp*10000 AND count&amp;lt;=tmp*10000+9999 
          | fields eid |  format]
| delete&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 14:22:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-delete-duplicate-logs/m-p/597614#M208073</guid>
      <dc:creator>mclane1</dc:creator>
      <dc:date>2022-05-12T14:22:34Z</dc:date>
    </item>
  </channel>
</rss>

