<?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: Comparing index sizes on 2 dates in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487354#M141563</link>
    <description>&lt;P&gt;exactly what I needed, thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Mar 2020 14:14:35 GMT</pubDate>
    <dc:creator>tsheets13</dc:creator>
    <dc:date>2020-03-05T14:14:35Z</dc:date>
    <item>
      <title>Comparing index sizes on 2 dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487350#M141559</link>
      <description>&lt;P&gt;I have been asked to create an alert that looks at the index sizes (all indexes) for today, and compare them to the sizes as they were one week ago. I know I can get the index sizes for the last 7 days with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; index=_introspection component=Indexes | eval data.total_size = 'data.total_size' / 1024 | timechart span=1d max("data.total_size") by data.name
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, how can I compare the sizes of each index, 1 by 1, between today and 7 days ago.&lt;/P&gt;
&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 18:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487350#M141559</guid>
      <dc:creator>tsheets13</dc:creator>
      <dc:date>2020-06-24T18:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing index sizes on 2 dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487351#M141560</link>
      <description>&lt;P&gt;Hi @tsheets13,&lt;/P&gt;

&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_introspection component=Indexes earliest=-1d@d latest=@d 
| eval field="today" 
| append 
    [ search index=_introspection component=Indexes earliest=-8d@d latest=-7d@d 
    | eval field="sevendaysago"] 
| eval total_size = 'data.total_size'/1024 
| stats max(total_size) as total_size by data.name, field 
| xyseries data.name field total_size 
| where today &amp;gt; sevendaysago
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Mar 2020 19:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487351#M141560</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-04T19:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing index sizes on 2 dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487352#M141561</link>
      <description>&lt;P&gt;That's perfect.  I am not sure why you singled out indexes with the name of &lt;EM&gt;device&lt;/EM&gt; and syslogs, but after I removed that, I got what I want.  Now if you don't mind helping me take it just a step further.  I need to alert if the difference between today and sevendaysago are greater than 20% on any given index and report that index and difference.  Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 20:33:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487352#M141561</guid>
      <dc:creator>tsheets13</dc:creator>
      <dc:date>2020-03-04T20:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing index sizes on 2 dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487353#M141562</link>
      <description>&lt;P&gt;I was checking this query on test data on my machine. You can calculate difference and check if it is greater than 20% of index size 7 days ago. Check this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_introspection component=Indexes earliest=-1d@d latest=@d 
| eval field="today" 
| append 
    [ search index=_introspection component=Indexes earliest=-8d@d latest=-7d@d 
    | eval field="sevendaysago"] 
| eval total_size = 'data.total_size'/1024 
| stats max(total_size) as total_size by data.name, field 
| xyseries data.name field total_size 
| eval difference = today - sevendaysago 
| where difference &amp;gt; sevendaysago*20/100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please accept and upvote answer if this helps you:)&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 23:58:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487353#M141562</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-04T23:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing index sizes on 2 dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487354#M141563</link>
      <description>&lt;P&gt;exactly what I needed, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 14:14:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487354#M141563</guid>
      <dc:creator>tsheets13</dc:creator>
      <dc:date>2020-03-05T14:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing index sizes on 2 dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487355#M141564</link>
      <description>&lt;P&gt;you're welcome.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 08:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-index-sizes-on-2-dates/m-p/487355#M141564</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-06T08:16:34Z</dc:date>
    </item>
  </channel>
</rss>

