<?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 show the total size of events from a source in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261060#M78346</link>
    <description>&lt;P&gt;GREAT query. Using this one now and very helpful. Thanks so much!&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2017 20:09:43 GMT</pubDate>
    <dc:creator>joesrepsol</dc:creator>
    <dc:date>2017-05-17T20:09:43Z</dc:date>
    <item>
      <title>How to show the total size of events from a source?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261053#M78339</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to show a customer that Splunk is processing their entire file, and thought a good way of doing it was to calculate the total size of events from particular sources and then comparing it to the logfile itself. Is this possible? If so, how?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 19:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261053#M78339</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2022-09-28T19:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261054#M78340</link>
      <description>&lt;P&gt;If comparing byte or character counts be aware that Splunk does not index LINE_BREAKER characters ([\r\n], by default) so allow for that in your comparison.&lt;BR /&gt;
I would probably compare the event count in Splunk to the number of lines in the log file, assuming a 1:1 ratio.  This may not work if you merge multiple lines into a single event or split lines into multiple events.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 12:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261054#M78340</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-03-24T12:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261055#M78341</link>
      <description>&lt;P&gt;If you are suing the default LINE_BREAKER which means each line is a single event then you can count lines.  If you are sending all of the data (not diverting any to nullQueue) then you can count bytes.&lt;/P&gt;

&lt;P&gt;Both like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* source=MyFile | eval bytes=len(_raw) | stats count AS Lines sum(bytes) AS Bytes by source
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Mar 2016 15:44:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261055#M78341</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-24T15:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261056#M78342</link>
      <description>&lt;P&gt;Don't forget the license_usage.log file. Assuming there is no congestion, the license_usage.log file would show for any source (s), sourcetype (st), index (i), or host (h), the bytes (b) of that event. Therefore you could add up (sum) the total bytes per that file to show the true size. Or the roll over events each night will show a summary statistic of the same.&lt;/P&gt;

&lt;P&gt;If there is no value for those fields then you may be on an old version of splunk OR there was index congestion.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:14:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261056#M78342</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2020-09-29T09:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261057#M78343</link>
      <description>&lt;P&gt;You can use license_usage.log file as suggested by SloshBurch.&lt;/P&gt;

&lt;P&gt;here is the query:&lt;BR /&gt;
&lt;CODE&gt;index=_internal source="*license_usage.log*" type=Usage | stats sum(eval(b/1024/1024)) AS volume_b by s&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This will give you size of each source in MBs.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 05:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261057#M78343</guid>
      <dc:creator>deepak_acalvio</dc:creator>
      <dc:date>2017-01-24T05:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261058#M78344</link>
      <description>&lt;P&gt;You should pick the best answer that got you to a solution and click &lt;CODE&gt;Accept&lt;/CODE&gt; to close the question.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 16:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261058#M78344</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-01-24T16:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261059#M78345</link>
      <description>&lt;P&gt;I used to do it this way but recently learned that this won't be 100% accurate because &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;it assumes that &lt;CODE&gt;len&lt;/CODE&gt; and the license counter measure the same (they don't, &lt;CODE&gt;len&lt;/CODE&gt; measures characters while the license counter measures bytes)&lt;/LI&gt;
&lt;LI&gt;it assumes that there's no delay or lag in indexing. &lt;CODE&gt;_indextime&lt;/CODE&gt; is not the same as &lt;CODE&gt;_time&lt;/CODE&gt;. Sometimes forwarders get backed up and an item may be indexed some time after what it's &lt;CODE&gt;_time&lt;/CODE&gt; value is.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 25 Jan 2017 13:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261059#M78345</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2017-01-25T13:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261060#M78346</link>
      <description>&lt;P&gt;GREAT query. Using this one now and very helpful. Thanks so much!&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 20:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261060#M78346</guid>
      <dc:creator>joesrepsol</dc:creator>
      <dc:date>2017-05-17T20:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261061#M78347</link>
      <description>&lt;P&gt;These are both excellent points and my answer was very US-centric and not fully qualified.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 02:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261061#M78347</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-18T02:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261062#M78348</link>
      <description>&lt;P&gt;This is another VERY excellent point.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 02:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/261062#M78348</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-18T02:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the total size of events from a source</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/615041#M213743</link>
      <description>&lt;P&gt;The question is about source so unfortunately in most environments the usage.log will not be accurate. If you have a small Splunk environment it will probably work, but Splunk squashes the values of source and host to keep the event counts down for the usage.log file. It doesn't squash index or sourcetype so those would be accurate but if you are trying to use host or source and you have an environment that is not small, most likely this will be less accurate than summing up the lengths of all the _raw data.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 19:19:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-total-size-of-events-from-a-source/m-p/615041#M213743</guid>
      <dc:creator>fredclown</dc:creator>
      <dc:date>2022-09-28T19:19:24Z</dc:date>
    </item>
  </channel>
</rss>

