<?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 calculate the index size from all indexers in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96945#M182546</link>
    <description>&lt;P&gt;You can even summarize this (with &lt;CODE&gt;|collect index=summary&lt;/CODE&gt;) and then do data capacity planning!&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2013 12:23:57 GMT</pubDate>
    <dc:creator>alacercogitatus</dc:creator>
    <dc:date>2013-10-14T12:23:57Z</dc:date>
    <item>
      <title>How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96940#M182541</link>
      <description>&lt;P&gt;Is there a way to calculate total size of an index from all indexers?&lt;BR /&gt;
I can see index size from each individual indexer but i have around 30 indexers in the setup i am working on..so ideally wouldn't work if go and check index size in each indexer individually&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 10:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96940#M182541</guid>
      <dc:creator>adityapavan18</dc:creator>
      <dc:date>2013-10-14T10:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96941#M182542</link>
      <description>&lt;P&gt;Hi adityapavan18&lt;/P&gt;

&lt;P&gt;one way would be to use the REST endpoint &lt;CODE&gt;/services/data/indexes&lt;/CODE&gt; for that, but this must be done against each indexer. Personally I would setup a summarized saved search on each indexer which runs the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     | rest /services/data/indexes | stats values(currentDBSizeMB) by title
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This way you will be able to get the index size for each indexer with one single search afterwards.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 10:50:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96941#M182542</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2013-10-14T10:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96942#M182543</link>
      <description>&lt;P&gt;The &lt;CODE&gt;eventcount&lt;/CODE&gt; command may be what you need:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Eventcount"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Eventcount&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Haven't tried it against multiple indexers however.&lt;/P&gt;

&lt;P&gt;This command requires a "&lt;CODE&gt;|&lt;/CODE&gt;" before the command to run.&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 10:59:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96942#M182543</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2013-10-14T10:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96943#M182544</link>
      <description>&lt;P&gt;Building on MuS' answer, you can do each indexer from a single search head. This will require SoS to be installed ( &lt;CODE&gt;&lt;A href="http://apps.splunk.com/app/748/" target="test_blank"&gt;http://apps.splunk.com/app/748/&lt;/A&gt;&lt;/CODE&gt; ).&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| inputlookup splunk_servers_cache | search server_role="search-peer" | map maxsearches=100 search="| rest /services/data/indexes splunk_server=$sos_server$ " | stats sum(currentDBSizeMB) by title splunk_server&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Each of these calls should be really quick, so the number of search-peers will increase execution time, but not as badly as if you were doing a data search.&lt;/P&gt;

&lt;P&gt;You can also adjust the stats do whatever you need, &lt;CODE&gt;| stats sum(currentDBSizeMB) by title&lt;/CODE&gt;. &lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 11:49:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96943#M182544</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-10-14T11:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96944#M182545</link>
      <description>&lt;P&gt;Thanx a lot...I do have S.o.S installed..and running this query provided me the data i require&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 12:23:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96944#M182545</guid>
      <dc:creator>adityapavan18</dc:creator>
      <dc:date>2013-10-14T12:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96945#M182546</link>
      <description>&lt;P&gt;You can even summarize this (with &lt;CODE&gt;|collect index=summary&lt;/CODE&gt;) and then do data capacity planning!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 12:23:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96945#M182546</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-10-14T12:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96946#M182547</link>
      <description>&lt;P&gt;Thanx MuS.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 12:24:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96946#M182547</guid>
      <dc:creator>adityapavan18</dc:creator>
      <dc:date>2013-10-14T12:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96947#M182548</link>
      <description>&lt;P&gt;this helps only for a particular indexer.Not sure how we use for multiple indexers&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 12:24:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96947#M182548</guid>
      <dc:creator>adityapavan18</dc:creator>
      <dc:date>2013-10-14T12:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96948#M182549</link>
      <description>&lt;P&gt;@adityapavan18, again I'm not sure, as I only one indexer to play around with at the moment, but perhaps the following, seems odd to me that it has the server field if it is localized to one server...&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| eventcount summarize=false index=* report_size=true | eval MB=(size_bytes/1024)/1024 | stats sum(MB) by index, server&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 14:32:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96948#M182549</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2013-10-14T14:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96949#M182550</link>
      <description>&lt;P&gt;this is way better, as anything that requires the 3rd party app like SOS is not a clean one IMHO.  i think more and more of these weird little tasks must be phased out and worked into core splunk (via REST API for instance or DMC moving forward.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2015 01:39:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96949#M182550</guid>
      <dc:creator>awurster</dc:creator>
      <dc:date>2015-02-09T01:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96950#M182551</link>
      <description>&lt;P&gt;| rest /services/data/indexes | stats values(currentDBSizeMB) by title&lt;/P&gt;

&lt;P&gt;That only provides data of index per indexer, it's not added up..  How would you sum it?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:05:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96950#M182551</guid>
      <dc:creator>mendesjo</dc:creator>
      <dc:date>2016-02-22T14:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96951#M182552</link>
      <description>&lt;P&gt;Nope doesn't work..&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:06:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96951#M182552</guid>
      <dc:creator>mendesjo</dc:creator>
      <dc:date>2016-02-22T14:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96952#M182553</link>
      <description>&lt;P&gt;why not just use | stats sum(currentDBSizeMB) by title&lt;/P&gt;

&lt;P&gt;instead of values?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2016 06:35:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96952#M182553</guid>
      <dc:creator>Muryoutaisuu</dc:creator>
      <dc:date>2016-06-30T06:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96953#M182554</link>
      <description>&lt;P&gt;Because &lt;CODE&gt;currentDBSizeMB&lt;/CODE&gt; is the size of each index and there is no need to &lt;CODE&gt;sum()&lt;/CODE&gt; them.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 22:18:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96953#M182554</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2017-10-17T22:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96954#M182555</link>
      <description>&lt;P&gt;Quick and dirty solution is to run this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rest /services/data/indexes | where totalEventCount!=0 | stats values(currentDBSizeMB) AS size by title | streamstats sum(size) AS total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Oct 2017 22:22:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96954#M182555</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2017-10-17T22:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96955#M182556</link>
      <description>&lt;P&gt;Note that currentDBsizeMB is 1 for an index with no events. Might want to filter out those where totalEventCount=0&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 23:38:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96955#M182556</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2017-10-17T23:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96956#M182557</link>
      <description>&lt;P&gt;Good point, I changed the search - thanks &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 02:12:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96956#M182557</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2017-10-18T02:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96957#M182558</link>
      <description>&lt;P&gt;SoS is discontinued and no longer supported. Is there an alternative query that can be run now?&lt;/P&gt;

&lt;P&gt;My apologies if I should have posted this in a new question.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 18:18:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96957#M182558</guid>
      <dc:creator>dtrelford</dc:creator>
      <dc:date>2018-10-22T18:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96958#M182559</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| rest /services/data/indexes |  stats sum(currentDBSizeMB) by title splunk_server
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above might do it, you can use the REST API or use the monitoring console. The monitoring console  has a variety of queries that do this which you can borrow by clicking on the magnifying glass (it replaces SoS)&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 21:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96958#M182559</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2018-10-22T21:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the index size from all indexers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96959#M182560</link>
      <description>&lt;P&gt;worked for me - thanks MHibbin&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 16:35:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-index-size-from-all-indexers/m-p/96959#M182560</guid>
      <dc:creator>aokur_splunk</dc:creator>
      <dc:date>2019-02-08T16:35:07Z</dc:date>
    </item>
  </channel>
</rss>

