<?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: LIcense Usage by Source Type in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212014#M62015</link>
    <description>&lt;P&gt;change sourcetype to "st" . The query works&lt;/P&gt;

&lt;P&gt;index=_internal source="&lt;EM&gt;license_usage.log&lt;/EM&gt;"&lt;BR /&gt;
 | timechart span=1d sum(eval(round(b/1024/1024/1024,5))) by st&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 14:08:04 GMT</pubDate>
    <dc:creator>merp96</dc:creator>
    <dc:date>2020-09-29T14:08:04Z</dc:date>
    <item>
      <title>LIcense Usage by Source Type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212010#M62011</link>
      <description>&lt;P&gt;Can someone help me include sourcetype to my search below? I am trying to run a report for the past 60 days and need it by Sourcetype or Host. However, I don't see sourcetype as a field to choose from. I know Splunk has a license usage report but I'm needing the data behind it and for the past 60 days.&lt;BR /&gt;
Here is my search string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log* type=Usage | timechart span=1d sum(b) as bytes | eval GB = round(bytes/1024/1024/1024,2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 15:27:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212010#M62011</guid>
      <dc:creator>fmpa_isaac</dc:creator>
      <dc:date>2016-06-16T15:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: LIcense Usage by Source Type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212011#M62012</link>
      <description>&lt;P&gt;See if my answer here helps:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/344834/how-to-get-a-license-report-with-sourcetypes-and-i.html"&gt;https://answers.splunk.com/answers/344834/how-to-get-a-license-report-with-sourcetypes-and-i.html&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log type="Usage" 
 | eval indexname = if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx)
 | eval sourcetypename = st
 | bin _time span=1d 
 | stats sum(b) as b by _time, pool, indexname, sourcetypename
 | eval GB=round(b/1024/1024/1024, 3)
 | fields _time, indexname, sourcetypename, GB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jun 2016 15:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212011#M62012</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-06-16T15:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: LIcense Usage by Source Type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212012#M62013</link>
      <description>&lt;P&gt;Yes, thank you Javier.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 15:42:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212012#M62013</guid>
      <dc:creator>fmpa_isaac</dc:creator>
      <dc:date>2016-06-16T15:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: LIcense Usage by Source Type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212013#M62014</link>
      <description>&lt;P&gt;This one works - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source="*license_usage.log*"
| timechart span=1d sum(eval(round(b/1024/1024/1024,5))) by idx
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If we change it to -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source="*license_usage.log*"
| timechart span=1d sum(eval(round(b/1024/1024/1024,5))) by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The sourcetype ends up to be &lt;CODE&gt;splunkd&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 15:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212013#M62014</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-06-16T15:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: LIcense Usage by Source Type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212014#M62015</link>
      <description>&lt;P&gt;change sourcetype to "st" . The query works&lt;/P&gt;

&lt;P&gt;index=_internal source="&lt;EM&gt;license_usage.log&lt;/EM&gt;"&lt;BR /&gt;
 | timechart span=1d sum(eval(round(b/1024/1024/1024,5))) by st&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:08:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212014#M62015</guid>
      <dc:creator>merp96</dc:creator>
      <dc:date>2020-09-29T14:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: LIcense Usage by Source Type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212015#M62016</link>
      <description>&lt;P&gt;Below is an example for the volume per sourcetype. The detail per sourcetype and index is always completed (no squash_threshold )&lt;BR /&gt;
The fields are "st" for sourcetype, and "idx" for index.&lt;/P&gt;

&lt;P&gt;We use the time bucket to do the sum per day, but you could do otherwise.&lt;BR /&gt;
Keep in  mind that the license-master reports the daily usage a midnight (timezone of the license-master), not necessarily in your timezone.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#by sourcetype
index=_internal source=*license_usage.log* type="Usage"
| bucket _time span=1d
| stats sum(b) As bytes by _time st

#by index
index=_internal source=*license_usage.log* type="Usage"
| bucket _time span=1d
| stats sum(b) As bytes by _time idx
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are looking for a volume per host, the field to group by is "h", (or source with "s")  but then you may encounter the issue of  the squash_threshold. We recommend to do something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# by host 
index=_internal source=*license_usage.log* type="Usage"
| bucket _time span=1d
| filnull h,s value="missing"  | stats sum(b) As bytes  by _time h 

#by source
index=_internal source=*license_usage.log* type="Usage"
| bucket _time span=1d
| filnull h,s value="missing"  | stats sum(b) As bytes  by _time s 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 17:57:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212015#M62016</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2018-12-07T17:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: LIcense Usage by Source Type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212016#M62017</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;
If I want to gather the statistics day by day for seeing the trend of each type of data and for checking the usage of any new data on-board in the future.&lt;BR /&gt;
How should I modify the query? &lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 04:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/LIcense-Usage-by-Source-Type/m-p/212016#M62017</guid>
      <dc:creator>ctksplunkctk</dc:creator>
      <dc:date>2020-02-11T04:32:51Z</dc:date>
    </item>
  </channel>
</rss>

