<?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 How to find out unused indexes in DMC? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316813#M94801</link>
    <description>&lt;P&gt;Could anyone please help to find out unused indexes in Splunk DMC&lt;/P&gt;</description>
    <pubDate>Mon, 04 Sep 2017 04:34:56 GMT</pubDate>
    <dc:creator>AbilashSe</dc:creator>
    <dc:date>2017-09-04T04:34:56Z</dc:date>
    <item>
      <title>How to find out unused indexes in DMC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316813#M94801</link>
      <description>&lt;P&gt;Could anyone please help to find out unused indexes in Splunk DMC&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 04:34:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316813#M94801</guid>
      <dc:creator>AbilashSe</dc:creator>
      <dc:date>2017-09-04T04:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out unused indexes in DMC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316814#M94802</link>
      <description>&lt;P&gt;unused indexes meaning, indexes that didnt receive data for how long? or never received any data at all?!?! (empty index)&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 06:02:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316814#M94802</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-09-04T06:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out unused indexes in DMC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316815#M94803</link>
      <description>&lt;P&gt;Indexes which didn't receive data for long time.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 06:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316815#M94803</guid>
      <dc:creator>AbilashSe</dc:creator>
      <dc:date>2017-09-04T06:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out unused indexes in DMC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316816#M94804</link>
      <description>&lt;P&gt;Hi AbilashSe,&lt;BR /&gt;
if you want to see unused indexes you could go in [Indexing -- Indexes and Volumes -- Index Detail: Deployment], and see for each Index if it doesn't receive logs for a long time.&lt;BR /&gt;
If you want a report of last and first event of each index use something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest splunk_server_group=dmc_group_indexer splunk_server_group="*" /services/data/indexes | table title maxTime minTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 11:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316816#M94804</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-04T11:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out unused indexes in DMC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316817#M94805</link>
      <description>&lt;P&gt;Hi Giuseppe,&lt;/P&gt;

&lt;P&gt;Thanks for the update..&lt;BR /&gt;
I would like to get the count of unused indexes.&lt;/P&gt;

&lt;P&gt;could you please help me.?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Abilash&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 11:23:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316817#M94805</guid>
      <dc:creator>AbilashSe</dc:creator>
      <dc:date>2017-09-04T11:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out unused indexes in DMC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316818#M94806</link>
      <description>&lt;P&gt;Hi AbilashSe,&lt;BR /&gt;
when you say "unused indexes", do you mean:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;indexes without events,&lt;/LI&gt;
&lt;LI&gt;indexes with events older than a date (e.g. "2017-09-04 8:00:00")?&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;in first case&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest splunk_server_group=dmc_group_indexer splunk_server_group="*" /services/data/indexes
| eval indexSizeGB = if(currentDBSizeMB &amp;gt;= 1 AND totalEventCount &amp;gt;=1, currentDBSizeMB/1024, null())
| stats  sum(indexSizeGB) AS totalSize BY title 
| where totalSize=0
| table title 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the second case run something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest splunk_server_group=dmc_group_indexer splunk_server_group="*" /services/data/indexes 
| eval 
     time_limit=strptime("2017-09-04 8:00:00","%Y-%m-%d %H:%M:%S"),
     maxTime=strptime(time_limit,"%Y-%m-%dT%H:%M:%S")
| where maxTime&amp;lt;time_limit
| table title maxTime minTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 11:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/316818#M94806</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-04T11:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out unused indexes in DMC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/623675#M216809</link>
      <description>&lt;P&gt;Thanks for the query, i developed it to be something usable....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest splunk_server_group=dmc_group_indexer splunk_server_group="*" /services/data/indexes 
| stats max(maxTime) AS latestEvent BY title
| eval elapsedTime = now() - strptime(latestEvent,"%Y-%m-%dT%H:%M:%S%z"),  daysSince = ceiling(elapsedTime / 86400)
| eval daysSinceLastEvent = case(daysSince&amp;lt;0, -1, daysSince=0, 0, daysSince&amp;gt;0,daysSince)
| eval indexStatus = case(daysSinceLastEvent&amp;gt;730, "Nothing Since 2 years",
                          daysSinceLastEvent&amp;lt;730 AND daysSinceLastEvent&amp;gt;365, "Nothing Since last year", 
                          daysSinceLastEvent&amp;lt;365 AND daysSinceLastEvent&amp;gt;0, "used in last year",
                          daysSinceLastEvent=0, "Till today",
                          daysSinceLastEvent&amp;lt;0, "bad future timestamp")
| fields title latestEvent daysSinceLastEvent indexStatus&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 08 Dec 2022 07:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-out-unused-indexes-in-DMC/m-p/623675#M216809</guid>
      <dc:creator>faisal_mansour</dc:creator>
      <dc:date>2022-12-08T07:49:02Z</dc:date>
    </item>
  </channel>
</rss>

