<?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 list all indexes that shows Time, Index Name, Size and NumOfEvents for each index? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252552#M48575</link>
    <description>&lt;P&gt;The metrics log probably doesn't have the information you need, as it samples the data - it is not complete.&lt;/P&gt;

&lt;P&gt;This is not exactly what you asked for, but it is correct and complete. It examines the buckets in each index and calculates the number of events, the size on disk and the raw data size. It will run quickly. If your buckets roll more often than once per day, then this may match a day's worth of data fairly accurately...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbinspect index=* | search index!=_*| fields bucketId endEpoch eventCount sizeOnDiskMB startEpoch index rawSize
| where endEpoch &amp;gt; relative_time(now(), "-1d@d")
| stats min(startEpoch) as startEpoch max(endEpoch) as endEpoch sum(eventCount) as EventCount sum(sizeOnDiskMB) as "Size On Disk (MB)" sum(rawSize) as rSize by index
| eval "Raw Data Size (MB)"=round(rSize/1024/1024,2) | eval "Size On Disk (MB)"=round('Size On Disk (MB)',2)
| eval "Time Range (hrs)" = round((endEpoch - startEpoch)/3600,2)
| eval "End Time"=strftime(endEpoch,"%x %X") | eval "Start Time"=strftime(startEpoch,"%x %X")
| table index "Start Time" "End Time" "Time Range (hrs)" EventCount "Raw Data Size (MB)" "Size On Disk (MB)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that the second line is where the actual time range is chosen. The selection says "choose buckets where the latest event in the bucket is within the last day." If you used &lt;CODE&gt;startEpoch&lt;/CODE&gt; instead of &lt;CODE&gt;endEpoch&lt;/CODE&gt;, Splunk would select only index buckets that had been started within the last day.&lt;/P&gt;

&lt;P&gt;HOORAY! UPDATE to the UPDATE!! dbinspect now works in a distributed environment! Yay!&lt;/P&gt;

&lt;P&gt;[OLD UPDATE] I dbinspect does not work properly in a distributed environment IN OLDER VERSIONS OF SPLUNK - it needs to be run on each indexer. However there is a answer that addresses this:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/6147/how-to-generate-a-report-on-multiple-indexes.html"&gt;https://answers.splunk.com/answers/6147/how-to-generate-a-report-on-multiple-indexes.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 28 Nov 2015 22:23:21 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2015-11-28T22:23:21Z</dc:date>
    <item>
      <title>How to list all indexes that shows Time, Index Name, Size and NumOfEvents for each index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252551#M48574</link>
      <description>&lt;P&gt;Hi, I'd like to get a list of all indexes that shows the data in the following format for a given time span such as last 7 days:&lt;/P&gt;

&lt;P&gt;_time   indexName   IndexedVolumeSizeInMBofTheDay   NumOfEventsOfTheDay&lt;/P&gt;

&lt;P&gt;For example:&lt;BR /&gt;
2015-11-20 myIndex-A  1234  1000&lt;BR /&gt;
2015-11-20 myIndex-B  567   300&lt;BR /&gt;
2015-11-20 myIndex-X  543   250&lt;BR /&gt;
...&lt;BR /&gt;
2015-11-21 myIndex-A  9876  2000&lt;BR /&gt;
2015-11-21 myIndex-B  3542  341&lt;BR /&gt;
2015-11-21 myIndex-X  18332 6723&lt;BR /&gt;
...&lt;BR /&gt;
I found the following search on this site, but the output of the list has limited columns, max 13 cols only?, and it doesn't show all indexes.  We have over 140+ indexes! Is there a way to make this search list the output in above format or something similar and show all indexes?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics.log group=per_index_thruput series=* | eval MB = round(kb/1024,2) | timechart sum(MB) as MB by series
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Nov 2015 05:12:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252551#M48574</guid>
      <dc:creator>flee</dc:creator>
      <dc:date>2015-11-28T05:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all indexes that shows Time, Index Name, Size and NumOfEvents for each index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252552#M48575</link>
      <description>&lt;P&gt;The metrics log probably doesn't have the information you need, as it samples the data - it is not complete.&lt;/P&gt;

&lt;P&gt;This is not exactly what you asked for, but it is correct and complete. It examines the buckets in each index and calculates the number of events, the size on disk and the raw data size. It will run quickly. If your buckets roll more often than once per day, then this may match a day's worth of data fairly accurately...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbinspect index=* | search index!=_*| fields bucketId endEpoch eventCount sizeOnDiskMB startEpoch index rawSize
| where endEpoch &amp;gt; relative_time(now(), "-1d@d")
| stats min(startEpoch) as startEpoch max(endEpoch) as endEpoch sum(eventCount) as EventCount sum(sizeOnDiskMB) as "Size On Disk (MB)" sum(rawSize) as rSize by index
| eval "Raw Data Size (MB)"=round(rSize/1024/1024,2) | eval "Size On Disk (MB)"=round('Size On Disk (MB)',2)
| eval "Time Range (hrs)" = round((endEpoch - startEpoch)/3600,2)
| eval "End Time"=strftime(endEpoch,"%x %X") | eval "Start Time"=strftime(startEpoch,"%x %X")
| table index "Start Time" "End Time" "Time Range (hrs)" EventCount "Raw Data Size (MB)" "Size On Disk (MB)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that the second line is where the actual time range is chosen. The selection says "choose buckets where the latest event in the bucket is within the last day." If you used &lt;CODE&gt;startEpoch&lt;/CODE&gt; instead of &lt;CODE&gt;endEpoch&lt;/CODE&gt;, Splunk would select only index buckets that had been started within the last day.&lt;/P&gt;

&lt;P&gt;HOORAY! UPDATE to the UPDATE!! dbinspect now works in a distributed environment! Yay!&lt;/P&gt;

&lt;P&gt;[OLD UPDATE] I dbinspect does not work properly in a distributed environment IN OLDER VERSIONS OF SPLUNK - it needs to be run on each indexer. However there is a answer that addresses this:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/6147/how-to-generate-a-report-on-multiple-indexes.html"&gt;https://answers.splunk.com/answers/6147/how-to-generate-a-report-on-multiple-indexes.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Nov 2015 22:23:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252552#M48575</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-11-28T22:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all indexes that shows Time, Index Name, Size and NumOfEvents for each index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252553#M48576</link>
      <description>&lt;P&gt;Thanks lguinn.  When I used &lt;CODE&gt;where startEpoch &amp;gt; relative_time(now(), "-1d@d")&lt;/CODE&gt;, it also returns data indexed today and data from yesterday's and only returns a small set of indexes out of some 50 indexes that have data.  How do I define exact From and To Date-Time boundary?  Is there a way to list all indexes regardless any data was indexed for that given date/time range?&lt;/P&gt;

&lt;P&gt;We have clustered indexers, does the dbinspect command run on a clustered Search Head run against all indexers in the cluster or does the command need to run on each indexer?&lt;/P&gt;

&lt;P&gt;I also noticed some SOS and DMC panels on indexes are using _internal *metrics.log.  Why would those tools use metrics.log to pull indexes related data if data is not complete as you mentioned? &lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 03:56:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252553#M48576</guid>
      <dc:creator>flee</dc:creator>
      <dc:date>2015-11-30T03:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all indexes that shows Time, Index Name, Size and NumOfEvents for each index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252554#M48577</link>
      <description>&lt;P&gt;Yes, the time range for dbinspect &lt;STRONG&gt;cannot&lt;/STRONG&gt; be exact. The timerange is used to identify any buckets that have data in the timerange - but the reporting is based on the &lt;STRONG&gt;entire bucket&lt;/STRONG&gt;, which can certainly have data outside the timerange. If you use the dbinspect command, there is no way around this.&lt;/P&gt;

&lt;P&gt;Many apps (including the DMC) and admins (including me), use the metrics log to get a handle on "what's going on." Looking at the most active data feeds or indexes or whatever is usually all the information that is needed. However, if you have low-volume objects, they will probably not appear in the metrics log. So don't expect this data to be complete - for example, you can't match it to the license usage.&lt;/P&gt;

&lt;P&gt;If you are looking for license usage, there is a log for that: license_usage.log&lt;BR /&gt;
However, it will not tell you everything that you've asked for, such as disk space consumed or number of events per day.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 19:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252554#M48577</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-11-30T19:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all indexes that shows Time, Index Name, Size and NumOfEvents for each index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252555#M48578</link>
      <description>&lt;P&gt;Thanks for your explanations lguinn!  That helped.  The data needs to be within the date/time range specified.  Other data points like number of events and Size on Disk are optional for my case.  It doesn’t need to match the license usage either.  &lt;/P&gt;

&lt;P&gt;Actually, the volume size for indexes from the metrics.log would be sufficient for what I need.  I’m able to get a report on all indexes by adding the limit=0; without this parameter the report is limited to 10 indexes only.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics.log group=per_index_thruput series=* | eval MB = round(kb/1024,2) | timechart sum(MB) as MB by series limit=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks again for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 03:03:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252555#M48578</guid>
      <dc:creator>flee</dc:creator>
      <dc:date>2015-12-01T03:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all indexes that shows Time, Index Name, Size and NumOfEvents for each index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252556#M48579</link>
      <description>&lt;P&gt;Thanks to @lstewart_splunk for updating me on the dbinspect command!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 06:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252556#M48579</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-12-03T06:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all indexes that shows Time, Index Name, Size and NumOfEvents for each index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252557#M48580</link>
      <description>&lt;P&gt;Good news!  In what version of Splunk that dbinspect started working in a distributed environment?  Thanks for the update!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 07:17:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252557#M48580</guid>
      <dc:creator>flee</dc:creator>
      <dc:date>2015-12-03T07:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all indexes that shows Time, Index Name, Size and NumOfEvents for each index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252558#M48581</link>
      <description>&lt;P&gt;flee, I think that was version 6.0.  And you are welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 22:52:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-list-all-indexes-that-shows-Time-Index-Name-Size-and/m-p/252558#M48581</guid>
      <dc:creator>lstewart_splunk</dc:creator>
      <dc:date>2015-12-03T22:52:10Z</dc:date>
    </item>
  </channel>
</rss>

