<?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: Query for monthly usage of index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176689#M186722</link>
    <description>&lt;P&gt;By usage of index you mean data indexed in Splunk?? If yes, then you can see the license usage in SoS here.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://yoursplunkserverURL/en-US/app/sos/license_usage_30days"&gt;http://yoursplunkserverURL/en-US/app/sos/license_usage_30days&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2015 16:13:20 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2015-03-13T16:13:20Z</dc:date>
    <item>
      <title>Query for monthly usage of index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176688#M186721</link>
      <description>&lt;P&gt;I am very new to Splunk I am trying to figure out how to do a query of monthly usage of index of Splunk. &lt;/P&gt;

&lt;P&gt;I have tried several different queries but I am not getting any results back.  The person who set it up does ave the app SOS installed. &lt;/P&gt;

&lt;P&gt;Any help would be much appreciated. &lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2015 15:40:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176688#M186721</guid>
      <dc:creator>rickdi</dc:creator>
      <dc:date>2015-03-13T15:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Query for monthly usage of index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176689#M186722</link>
      <description>&lt;P&gt;By usage of index you mean data indexed in Splunk?? If yes, then you can see the license usage in SoS here.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://yoursplunkserverURL/en-US/app/sos/license_usage_30days"&gt;http://yoursplunkserverURL/en-US/app/sos/license_usage_30days&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2015 16:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176689#M186722</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-03-13T16:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Query for monthly usage of index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176690#M186723</link>
      <description>&lt;P&gt;You are probably going to want to do a Summary Index search so that your searches are quicker if you have lots of data. I do a summary search every day at about 5AM for the previous day using the following search:&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) | stats sum(b) as b by idx | eval GB=(b/1024/1024/1024) | sort -GB | fields - b
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I use an additional value in the summary table of &lt;CODE&gt;report_type=daily_usage&lt;/CODE&gt; so that it will be unique.&lt;/P&gt;

&lt;P&gt;Then the query to do a roll-up of a month of data, you can use something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary report_type=daily_usage | stats sum(GB) as total by idx | eventstats sum(total) as GrandTotal | eval percent=round(total/GrandTotal*100,1) | sort -total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should get you a report of the total of each index by month. We do this because we have separate indexes for different departments and are doing a show-back (instead of a charge-back) of their Splunk usage.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2015 16:20:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176690#M186723</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2015-03-13T16:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Query for monthly usage of index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176691#M186724</link>
      <description>&lt;P&gt;If you are running Splunk Enterprise 6.0 or higher, you will find that we ship a built-in &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/LicenseUsageReportViewexamples"&gt;License Usage Report view&lt;/A&gt; which, when consulted from your license master, allows to report on daily license usage per index out of the box.&lt;/P&gt;

&lt;P&gt;Note that most of the searches behind the "Last 30 days" tab of this view are powered by a "datacube" search that can be &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/AboutSplunksLicenseUsageReportView#Split-by:_source.2C_source_type.2C_host.2C_index"&gt;accelerated on demand&lt;/A&gt; to ensure that the panels grouping daily license usage by index, source, sourcetype and host load fast.&lt;/P&gt;

&lt;P&gt;Finally, as @somesoni2 mentions if you are still running Splunk Enterprise 5.x, you will find a copy of the same view in S.o.S titled "License Usage - Last 30 Days".&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2015 17:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176691#M186724</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2015-03-13T17:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Query for monthly usage of index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176692#M186725</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thank you so much&lt;/STRONG&gt; I will try these out. &lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2015 04:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-for-monthly-usage-of-index/m-p/176692#M186725</guid>
      <dc:creator>rickdi</dc:creator>
      <dc:date>2015-03-14T04:05:50Z</dc:date>
    </item>
  </channel>
</rss>

