<?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: Limit for chart with split-by clause ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30526#M6188</link>
    <description>&lt;P&gt;so are you doing: &lt;BR /&gt;
index=foo | eval length=length(_raw) | chart limit=15 eval(sum(length)/1024/1024) as MiB by application&lt;/P&gt;

&lt;P&gt;?&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2011 20:07:28 GMT</pubDate>
    <dc:creator>RicoSuave</dc:creator>
    <dc:date>2011-12-07T20:07:28Z</dc:date>
    <item>
      <title>Limit for chart with split-by clause ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30525#M6187</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;i have this search:&lt;/P&gt;

&lt;P&gt;index=foo | eval length=length(_raw) | chart eval(sum(length)/1024/1024) as MiB by application&lt;/P&gt;

&lt;P&gt;Now i just want the first 15 apps. But using "limit=15" says:&lt;BR /&gt;
The following options were specified but have no effect when a split-by clause is not provided:limit.&lt;/P&gt;

&lt;P&gt;How can i use limit?&lt;/P&gt;

&lt;P&gt;Regards, Jens&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2011 20:01:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30525#M6187</guid>
      <dc:creator>JensT</dc:creator>
      <dc:date>2011-12-07T20:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Limit for chart with split-by clause ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30526#M6188</link>
      <description>&lt;P&gt;so are you doing: &lt;BR /&gt;
index=foo | eval length=length(_raw) | chart limit=15 eval(sum(length)/1024/1024) as MiB by application&lt;/P&gt;

&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2011 20:07:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30526#M6188</guid>
      <dc:creator>RicoSuave</dc:creator>
      <dc:date>2011-12-07T20:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Limit for chart with split-by clause ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30527#M6189</link>
      <description>&lt;P&gt;Thats what i would like to do, but thats not working.&lt;/P&gt;

&lt;P&gt;-- Jens&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2011 20:09:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30527#M6189</guid>
      <dc:creator>JensT</dc:creator>
      <dc:date>2011-12-07T20:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Limit for chart with split-by clause ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30528#M6190</link>
      <description>&lt;P&gt;I have the exact same issue. I'm doing this query, but get that exact error message.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex sourcetype=access_combined host=somehost | chart limit=7 count by root
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Leaving out the limit=7 works fine, but gives a chart that has about 20 items, which isn't important for my dashboard, and doesn't look very good. I just need the top 6-8 context roots displayed with HTTP request counts.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2012 01:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30528#M6190</guid>
      <dc:creator>combinatorics</dc:creator>
      <dc:date>2012-05-31T01:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Limit for chart with split-by clause ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30529#M6191</link>
      <description>&lt;P&gt;It appears that limit only works for timecharts, but you should be able to get the answer you are wanting by doing a reverse sort, to get the "top" entries to appear first, and then do a head, to show only the first x rows.&lt;/P&gt;

&lt;P&gt;So your search string should be :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo | eval length=length(_raw) | chart eval(sum(length)/1024/1024) as MiB by application | sort -MiB | head 15
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Oct 2013 04:37:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30529#M6191</guid>
      <dc:creator>russellliss</dc:creator>
      <dc:date>2013-10-05T04:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Limit for chart with split-by clause ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30530#M6192</link>
      <description>&lt;P&gt;To limit the queries with the "chart" command, just use the "sort" command and then indicate the number of lines you want to display:&lt;/P&gt;

&lt;P&gt;index=foo | eval length=length(_raw) | chart eval(sum(length)/1024/1024) as MiB by application | &lt;STRONG&gt;sort 15 -MiB&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 14:59:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Limit-for-chart-with-split-by-clause/m-p/30530#M6192</guid>
      <dc:creator>rmanrique</dc:creator>
      <dc:date>2018-10-26T14:59:31Z</dc:date>
    </item>
  </channel>
</rss>

