<?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 run license report on certain index/sourcetype combinations in Installation</title>
    <link>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358785#M4994</link>
    <description>&lt;P&gt;Try the &lt;A href="https://splunkbase.splunk.com/app/2949/"&gt;Meta Woot&lt;/A&gt; app for Splunk from Splunkbase.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Dec 2017 03:15:04 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-12-29T03:15:04Z</dc:date>
    <item>
      <title>How to run a license report on certain index/sourcetype combinations?</title>
      <link>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358783#M4992</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to run a report in MB for the last 7 days on a specific index and sourcetype combinations. I have this as a reference, but it filters on pool.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log* type="Usage" | eval h=if(len(h)=0 OR isnull(h),"(SQUASHED)",h) | eval s=if(len(s)=0 OR isnull(s),"(SQUASHED)",s) | eval idx=if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx) | bin _time span=1d | stats sum(b) as b by _time, pool, s, st, h, idx  | search pool="ECS Licensing" | timechart span=1d sum(b) AS volumeB by st fixedrange=false  | join type=outer _time [search index=_internal [`set_local_host`] source=*license_usage.log* type="RolloverSummary" earliest=-7d@d  | search pool="ECS Licensing" | eval _time=_time - 43200 | bin _time span=1d | stats latest(poolsz) AS  "pool size" by _time] | fields - _timediff  | foreach * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'/1024/1024/1024, 3)]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 22:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358783#M4992</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2020-06-15T22:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to run license report on certain index/sourcetype combinations</title>
      <link>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358784#M4993</link>
      <description>&lt;P&gt;Hi @a212830,&lt;/P&gt;

&lt;P&gt;Please try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log* type="Usage" | stats sum(b) AS Bytes by idx,st | eval MB=(Bytes/1024)/1024 | rename idx AS Index, st AS Sourcetype | table Index, Sourcetype, MB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above query will give you license usage by Index and Sourcetype.&lt;/P&gt;

&lt;P&gt;If you want to run report against specific Index and Sourcetype then you can run &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log* type="Usage" idx=&amp;lt;Index Name&amp;gt; st=&amp;lt;sourcetype&amp;gt; | stats sum(b) AS Bytes by idx,st | eval MB=(Bytes/1024)/1024 | rename idx AS Index, st AS Sourcetype | table Index, Sourcetype, MB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to count license usage on per day basis then you can include &lt;CODE&gt;| bin _time span=1d&lt;/CODE&gt; in your query so your query will be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log* type="Usage" idx=&amp;lt;Index Name&amp;gt; st=&amp;lt;sourcetype&amp;gt; | bin _time span=1d | stats sum(b) AS Bytes by idx,st | eval MB=(Bytes/1024)/1024 | rename idx AS Index, st AS Sourcetype | table Index, Sourcetype, MB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I hope this helps.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Harshil&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 02:49:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358784#M4993</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-12-29T02:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to run license report on certain index/sourcetype combinations</title>
      <link>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358785#M4994</link>
      <description>&lt;P&gt;Try the &lt;A href="https://splunkbase.splunk.com/app/2949/"&gt;Meta Woot&lt;/A&gt; app for Splunk from Splunkbase.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 03:15:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358785#M4994</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-29T03:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to run license report on certain index/sourcetype combinations</title>
      <link>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358786#M4995</link>
      <description>&lt;P&gt;Thanks.  It's giving me a total for each unique pair, but not by day. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 03:33:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358786#M4995</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2017-12-29T03:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to run license report on certain index/sourcetype combinations</title>
      <link>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358787#M4996</link>
      <description>&lt;P&gt;Please try &lt;CODE&gt;index=_internal source=*license_usage.log* type="Usage" | bin _time span=1d| stats sum(b) AS Bytes by idx,st | eval MB=(Bytes/1024)/1024 | rename idx AS Index, st AS Sourcetype | table Index, Sourcetype, MB&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;EDIT: Updated query.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 05:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358787#M4996</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-12-29T05:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to run license report on certain index/sourcetype combinations</title>
      <link>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358788#M4997</link>
      <description>&lt;P&gt;Same thing - there is no date breakdown when I list it for 7 days. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 13:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358788#M4997</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2017-12-29T13:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to run license report on certain index/sourcetype combinations</title>
      <link>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358789#M4998</link>
      <description>&lt;P&gt;I have updated query in my earlier comment, can you please try that?&lt;/P&gt;

&lt;P&gt;If that will not work then try this one &lt;CODE&gt;index=_internal source=*license_usage.log* type="Usage" | bin _time span=1d| stats sum(b) AS Bytes by idx,st,_time| eval MB=(Bytes/1024)/1024 | rename idx AS Index, st AS Sourcetype | table _time,Index, Sourcetype, MB&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;EDIT: Updated query&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 13:14:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-to-run-a-license-report-on-certain-index-sourcetype/m-p/358789#M4998</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2017-12-29T13:14:55Z</dc:date>
    </item>
  </channel>
</rss>

