<?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 Get database Size per day and Total size of all databases in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304201#M162779</link>
    <description>&lt;P&gt;I would like to get o/p as below &lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/228842-untitled-2.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I am using &lt;/P&gt;

&lt;P&gt;index=xxxx sourcetype="log" "Database =" AND "Size"  host=xxxxx | eval date=strftime(_time, "%Y-%m-%d") |eval Size_MB = replace(Size,"MB","") | eval Size_MB = replace(Size,"MB","") |table date Database Size_MB | addtotals &lt;/P&gt;

&lt;P&gt;But it give Total per row instead of combining rows or toal of database per day.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 18:09:48 GMT</pubDate>
    <dc:creator>dpatiladobe</dc:creator>
    <dc:date>2020-09-29T18:09:48Z</dc:date>
    <item>
      <title>Get database Size per day and Total size of all databases</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304201#M162779</link>
      <description>&lt;P&gt;I would like to get o/p as below &lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/228842-untitled-2.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I am using &lt;/P&gt;

&lt;P&gt;index=xxxx sourcetype="log" "Database =" AND "Size"  host=xxxxx | eval date=strftime(_time, "%Y-%m-%d") |eval Size_MB = replace(Size,"MB","") | eval Size_MB = replace(Size,"MB","") |table date Database Size_MB | addtotals &lt;/P&gt;

&lt;P&gt;But it give Total per row instead of combining rows or toal of database per day.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:09:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304201#M162779</guid>
      <dc:creator>dpatiladobe</dc:creator>
      <dc:date>2020-09-29T18:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get database Size per day and Total size of all databases</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304202#M162780</link>
      <description>&lt;P&gt;Try this!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xxxx sourcetype="log" "Database =" AND "Size" host=xxxxx 
|eval date=strftime(_time, "%Y-%m-%d") 
|eval Size_MB = replace(Size,"MB","") 
|table date Database Size_MB
|streamstats count as No by Data
|eventstats sum(size) as Total,max(No) as Max_No by  date
|eval Total=if(No=Max_No,Total,"")
|table date Database Size_MB Total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Feb 2018 05:52:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304202#M162780</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-02-22T05:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get database Size per day and Total size of all databases</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304203#M162781</link>
      <description>&lt;P&gt;You can try something like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=xxxx sourcetype="log" "Database =" AND "Size" host=xxxxx 
 |eval date=strftime(_time, "%Y-%m-%d") 
 |eval Size_MB = replace(Size,"MB","")
 |convert num(Size_MB) as Size_MB 
 |table date Database Size_MB
 |eventstats sum(Size_MB) as Total by  date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 06:07:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304203#M162781</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-22T06:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get database Size per day and Total size of all databases</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304204#M162782</link>
      <description>&lt;P&gt;The Total value is set for all rows and not as per the above. &lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 16:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304204#M162782</guid>
      <dc:creator>dpatiladobe</dc:creator>
      <dc:date>2018-02-22T16:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get database Size per day and Total size of all databases</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304205#M162783</link>
      <description>&lt;P&gt;The Total value is set for all rows and not as per the above. &lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 16:28:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304205#M162783</guid>
      <dc:creator>dpatiladobe</dc:creator>
      <dc:date>2018-02-22T16:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get database Size per day and Total size of all databases</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304206#M162784</link>
      <description>&lt;P&gt;Fix to display total on the last line.&lt;BR /&gt;
I have never done it before ...&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 14:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-database-Size-per-day-and-Total-size-of-all-databases/m-p/304206#M162784</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-02-23T14:03:46Z</dc:date>
    </item>
  </channel>
</rss>

