<?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: calculate storage and remove part of log in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Is-it-possible-to-calculate-storage-and-remove-part-of-log/m-p/631464#M15428</link>
    <description>&lt;P&gt;You can do some like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your search&amp;gt; | eval len=len(_raw) | stats sum(len)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will give you size in bytes.&amp;nbsp; This may also take some time depending of how much data you have how long back you do search.&lt;/P&gt;&lt;P&gt;To remove the same data, you can delete them.&amp;nbsp; You need to give admin the delete role first:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your search&amp;gt; | delete&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 19 Feb 2023 12:28:59 GMT</pubDate>
    <dc:creator>jotne</dc:creator>
    <dc:date>2023-02-19T12:28:59Z</dc:date>
    <item>
      <title>Is it possible to calculate storage and remove part of log?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Is-it-possible-to-calculate-storage-and-remove-part-of-log/m-p/631463#M15427</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Is it possible to calculate the storage that part of log is taking ?&amp;nbsp;&lt;BR /&gt;I have a log file that contains a message that i want to calculate the storage it takes&lt;/P&gt;
&lt;P&gt;after getting the numbers, is it possible to exclude it from index ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 15:10:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Is-it-possible-to-calculate-storage-and-remove-part-of-log/m-p/631463#M15427</guid>
      <dc:creator>SplunkySplunk</dc:creator>
      <dc:date>2023-02-21T15:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: calculate storage and remove part of log</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Is-it-possible-to-calculate-storage-and-remove-part-of-log/m-p/631464#M15428</link>
      <description>&lt;P&gt;You can do some like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your search&amp;gt; | eval len=len(_raw) | stats sum(len)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will give you size in bytes.&amp;nbsp; This may also take some time depending of how much data you have how long back you do search.&lt;/P&gt;&lt;P&gt;To remove the same data, you can delete them.&amp;nbsp; You need to give admin the delete role first:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your search&amp;gt; | delete&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 12:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Is-it-possible-to-calculate-storage-and-remove-part-of-log/m-p/631464#M15428</guid>
      <dc:creator>jotne</dc:creator>
      <dc:date>2023-02-19T12:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: calculate storage and remove part of log</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Is-it-possible-to-calculate-storage-and-remove-part-of-log/m-p/631469#M15429</link>
      <description>&lt;P&gt;Depends on what you need it for and when.&lt;/P&gt;&lt;P&gt;One thing is length of the raw data itself. And that was already shown. Another thing is how much space in splunk indexes is consuned by storing this particular event. And for this there is no clear single answer as it depends on how good the event (and whole bucket data) compresses, if you extract any additional indexed files and so on.&lt;/P&gt;&lt;P&gt;About excluding from indexes - again depends on what you really want. If you want to really prevent long events from getting indexed (why not just truncate them?), you'd have to do some check using ingest-time eval and then route to nullqueue based on the result of that check. If, however, you just want to not show long events in the results just filter your events with&lt;/P&gt;&lt;PRE&gt;| where len(_raw)&amp;lt;120&lt;/PRE&gt;&lt;P&gt;or whatever limit you want.&lt;/P&gt;&lt;P&gt;Don't use delete command. It has its very limited uses but generally shouldn't be used.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 13:49:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Is-it-possible-to-calculate-storage-and-remove-part-of-log/m-p/631469#M15429</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-02-19T13:49:13Z</dc:date>
    </item>
  </channel>
</rss>

