<?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 write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657817#M227208</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260645"&gt;@Yashvik&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal source=*license_usage.log* type="Usage" 
| eval h=if(len(h)=0 OR isnull(h),"(SQUASHED)",h) 
| eval s=if(len(s)=0 OR isnull(s),"(SQUASHED)",s) 
| eval idx=if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx) 
| bin _time span=1d 
| stats sum(b) as b by _time, pool, s, st, h, idx   
| bin span=1d _time 
| stats sum(b) AS volumeB by _time idx st 
| eval volumeB=round(volumeB/1024/1024/1024,2)
| sort 20 -volumeB&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Sun, 17 Sep 2023 11:05:47 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-09-17T11:05:47Z</dc:date>
    <item>
      <title>How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657815#M227206</link>
      <description>&lt;P&gt;Hello All,&lt;BR /&gt;I need to identify the top log sources which are sending large data to Splunk. Tried Licence master dashboard which isn't helping much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is to create a table which contains following fields. e.g: sourcetype, vol_GB, index, percentage.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 06:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657815#M227206</guid>
      <dc:creator>Yashvik</dc:creator>
      <dc:date>2023-09-17T06:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657817#M227208</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260645"&gt;@Yashvik&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal source=*license_usage.log* type="Usage" 
| eval h=if(len(h)=0 OR isnull(h),"(SQUASHED)",h) 
| eval s=if(len(s)=0 OR isnull(s),"(SQUASHED)",s) 
| eval idx=if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx) 
| bin _time span=1d 
| stats sum(b) as b by _time, pool, s, st, h, idx   
| bin span=1d _time 
| stats sum(b) AS volumeB by _time idx st 
| eval volumeB=round(volumeB/1024/1024/1024,2)
| sort 20 -volumeB&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 11:05:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657817#M227208</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-17T11:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657818#M227209</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks a lot for the swift response. the query gives the most of info I was looking for. However, it contains multiple entries for single index. Lets say If Index A has 3 sourcetypes, it appears in 3 rows.&amp;nbsp;&lt;BR /&gt;Can we group them in a single row?&amp;nbsp;&lt;BR /&gt;e.g:&lt;/P&gt;&lt;TABLE border="1" width="100.12642225031605%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="18.963337547408344%"&gt;_time&lt;/TD&gt;&lt;TD width="18.078381795195956%"&gt;index&lt;/TD&gt;&lt;TD width="23.640960809102403%"&gt;sourcetype&lt;/TD&gt;&lt;TD width="25.28445006321112%"&gt;Vol_GB&lt;/TD&gt;&lt;TD width="14.15929203539823%"&gt;percentage&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="18.963337547408344%"&gt;17th Sep&lt;/TD&gt;&lt;TD width="18.078381795195956%"&gt;Main&amp;nbsp;&lt;/TD&gt;&lt;TD width="23.640960809102403%"&gt;st1&lt;BR /&gt;st2&lt;BR /&gt;st3&lt;/TD&gt;&lt;TD width="25.28445006321112%"&gt;100G&lt;/TD&gt;&lt;TD width="14.15929203539823%"&gt;10.00%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sun, 17 Sep 2023 13:47:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657818#M227209</guid>
      <dc:creator>Yashvik</dc:creator>
      <dc:date>2023-09-17T13:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657844#M227223</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260645"&gt;@Yashvik&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you're not interested to the value for each sourcetype, but only to know which sourcetypes are in an index, you cam modify the above search in this way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal source=*license_usage.log* type="Usage" 
| eval h=if(len(h)=0 OR isnull(h),"(SQUASHED)",h) 
| eval s=if(len(s)=0 OR isnull(s),"(SQUASHED)",s) 
| eval idx=if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx) 
| bin _time span=1d 
| stats sum(b) as b by _time, pool, s, st, h, idx   
| bin span=1d _time 
| stats values( st) AS sourcetype sum(b) AS volumeB by _time idx 
| rename idx AS index
| eval volumeB=round(volumeB/1024/1024/1024,2)
| sort 20 -volumeB&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 06:18:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657844#M227223</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-18T06:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657853#M227229</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for the response. Unfortunately, I see only empty values for sourcetype column.&amp;nbsp; other 3 fields showing the info.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 07:50:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657853#M227229</guid>
      <dc:creator>Yashvik</dc:creator>
      <dc:date>2023-09-18T07:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657859#M227230</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260645"&gt;@Yashvik&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;very strange!&lt;/P&gt;&lt;P&gt;as you can see it works on my Splunk&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gcusello_0-1695025353570.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27222iFEB50B41AA0702CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gcusello_0-1695025353570.png" alt="gcusello_0-1695025353570.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;did you exactly copied my search?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 08:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657859#M227230</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-18T08:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657934#M227254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I used the same search which you shared above and didn't made any changes. I will share the screenshot shortly as I am getting some errors in uploading the picture.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 01:53:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657934#M227254</guid>
      <dc:creator>Yashvik</dc:creator>
      <dc:date>2023-09-19T01:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657942#M227258</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260645"&gt;@Yashvik&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I found an errore, even if it runs on my search, please try again this and check all the rows:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal source=*license_usage.log* type="Usage" 
| eval h=if(len(h)=0 OR isnull(h),"(SQUASHED)",h) 
| eval s=if(len(s)=0 OR isnull(s),"(SQUASHED)",s) 
| eval idx=if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx) 
| bin _time span=1d 
| stats sum(b) as b by _time, pool, s, st, h, idx   
| bin span=1d _time 
| stats values(st) AS sourcetype sum(b) AS volumeB by _time idx 
| rename idx AS index
| eval volumeB=round(volumeB/1024/1024/1024,2)
| sort 20 -volumeB&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 06:22:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/657942#M227258</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-19T06:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a SPL query to identify top 20 largest indexes / sourcetypes by size (In GB's)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/658063#M227306</link>
      <description>&lt;P&gt;Thanks a lot for the response&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;, it works.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 00:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-SPL-query-to-identify-top-20-largest-indexes/m-p/658063#M227306</guid>
      <dc:creator>Yashvik</dc:creator>
      <dc:date>2023-09-20T00:18:39Z</dc:date>
    </item>
  </channel>
</rss>

