<?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: Count Sourcetype by Day in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286163#M190695</link>
    <description>&lt;P&gt;4693489783100 bytes is 4693.4897831 GB. &lt;BR /&gt;
so, something wrong with "Bytes" calculation only. (earliest=-1d@d latest=@d  index=_internal  source=&lt;EM&gt;license_usage.log&lt;/EM&gt; type=Usage | stats sum(b) AS Bytes by st)&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 10:25:11 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2020-09-29T10:25:11Z</dc:date>
    <item>
      <title>Count Sourcetype by Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286162#M190694</link>
      <description>&lt;P&gt;In 6.4.2 version,&lt;BR /&gt;
when i try to count the integrated volume by sourcetype last day for example with this search :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-1d@d latest=@d  index=_internal source=*license_usage.log* type=Usage 
 | stats sum(b) AS Bytes by st | eval GB = (Bytes/1024/10241024/) | sort -GB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The volume seems to be wrong.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Sourcetype --------Bytes ---------------------GB
opsec---------4693489783100---------- 4371.152989
f5:hsl----------4472278291965---------- 4165.133733
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The real volume is near 43 Go but not 4371 Go&lt;/P&gt;

&lt;P&gt;In version 6.3.2, the results were correct.&lt;/P&gt;

&lt;P&gt;Have you one explanation please ?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 14:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286162#M190694</guid>
      <dc:creator>laberthelemy</dc:creator>
      <dc:date>2016-07-28T14:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count Sourcetype by Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286163#M190695</link>
      <description>&lt;P&gt;4693489783100 bytes is 4693.4897831 GB. &lt;BR /&gt;
so, something wrong with "Bytes" calculation only. (earliest=-1d@d latest=@d  index=_internal  source=&lt;EM&gt;license_usage.log&lt;/EM&gt; type=Usage | stats sum(b) AS Bytes by st)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:25:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286163#M190695</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-09-29T10:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Count Sourcetype by Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286164#M190696</link>
      <description>&lt;P&gt;When I google byte to GB and enter information you have in your question,&lt;BR /&gt;
4693489783100 bytes is equal to 4693.4897831 gb&lt;BR /&gt;
Do you think that first number is calculated wrong? in 6.32, does it give you 46934897831 in bytes?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 16:23:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286164#M190696</guid>
      <dc:creator>axl88</dc:creator>
      <dc:date>2016-07-28T16:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count Sourcetype by Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286165#M190697</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;The search you posted, is that what you are running exactly or did you just type it?Reason i ask,  I see a typo in there&lt;BR /&gt;
Highlighted in Bold. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-1d@d latest=@d  index=_internal source=*license_usage.log* type=Usage 
  | stats sum(b) AS Bytes by st | eval GB = (**Bytes/1024/10241024/**) | sort -GB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As far as the Bytes to GB calculation, that is absolutely right. I used my 6.4 splunk as well as a  calculator and &lt;STRONG&gt;4693489783100&lt;/STRONG&gt; Bytes is &lt;STRONG&gt;4371.152989GB&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I just ran the search on my LURV by sourcetype and GB calculation is correct. I suspect the Bytes value. It's almost like something is forcing the timerange to be much higher than the -1d@d ,@d . Again, mine is 6.4 and not 6.4.2.May be 6.4.2 has a bug to report the Bytes value some extra. Try not putting the earliest and latest in the search, instead use the Time picker and see if it changes (Guess).&lt;/P&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Raghav&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 16:28:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286165#M190697</guid>
      <dc:creator>Raghav2384</dc:creator>
      <dc:date>2016-07-28T16:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Count Sourcetype by Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286166#M190698</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I tried not putting the earliest and latest in the search but using Time picker. The result is the same . &lt;BR /&gt;
When I use Deployment Monitor /All Sourcetypes , the result is the same.&lt;BR /&gt;
May be , as you say, the 6.4.2 has a bug to report the Bytes.&lt;/P&gt;

&lt;P&gt;Thanks for your Help&lt;BR /&gt;
laberthelemy&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 09:47:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286166#M190698</guid>
      <dc:creator>laberthelemy</dc:creator>
      <dc:date>2016-07-29T09:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Count Sourcetype by Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286167#M190699</link>
      <description>&lt;P&gt;Check this one.. from a similar issue post - &lt;BR /&gt;
The only reliable source for license usage is the $SPLUNK_HOME/var/log/splunk/license_usage.log file on your license master instance, and unfortunately it does not split usage by index.&lt;/P&gt;

&lt;P&gt;There is, however, a sampled record of kilobytes indexed for the top 10 most active indexes every 30s in metrics.log. Of course if you have less than 10 active indexes, this is not an issue.&lt;/P&gt;

&lt;P&gt;So, for a report showing daily license usage over the past 1 day, you would run:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;index=_internal source=*license_usage.log type=RolloverSummary earliest=-1d&lt;BR /&gt;&lt;BR /&gt;
|eval GB = b/1024/1024/1024  | eval _time = _time - 43200&lt;BR /&gt;&lt;BR /&gt;
| timechart span=1d sum(GB) AS "Total GB used"&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;For a report showing estimated daily volume indexed (whether it counted against your license quota or not) over the past 7 days, you would run:&lt;/P&gt;

&lt;P&gt;index=_internal (host=indexer1 OR host=indexer2 OR host=license_master) source=*metrics.log group=per_index_thruput earliest=-7d&lt;BR /&gt;
 | timechart span=1d sum(eval(kb/1024)) AS "MB indexed" by series&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:26:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286167#M190699</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-09-29T10:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count Sourcetype by Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286168#M190700</link>
      <description>&lt;P&gt;With this search, the result shows a daily licence usage and unfortunately it does not split usage by sourcetype.&lt;BR /&gt;
But the result shows also a problem of conversion Bytes to Go&lt;BR /&gt;
Whe have a licence of 300 Go and the total is around of 21012 Go&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time -------------------------------------Total GB used
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2016-07-28 ---------------------------------21012.868955      &lt;/P&gt;

&lt;P&gt;In 6.4.2, may be, the search has to be adapted&lt;/P&gt;

&lt;P&gt;Thanks for your Help&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 12:11:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286168#M190700</guid>
      <dc:creator>laberthelemy</dc:creator>
      <dc:date>2016-07-29T12:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Count Sourcetype by Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286169#M190701</link>
      <description>&lt;P&gt;In 6.3.2, the calcul was right. Now, in 6.4.2, the result is not the reality. Something has been changed . The search, certainly, has to be changed&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 15:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Sourcetype-by-Day/m-p/286169#M190701</guid>
      <dc:creator>laberthelemy</dc:creator>
      <dc:date>2016-07-29T15:54:52Z</dc:date>
    </item>
  </channel>
</rss>

