<?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: Timechart along with top and sort in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140620#M38867</link>
    <description>&lt;P&gt;I have made some changes could you try it?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Apr 2014 19:49:33 GMT</pubDate>
    <dc:creator>linu1988</dc:creator>
    <dc:date>2014-04-23T19:49:33Z</dc:date>
    <item>
      <title>Timechart along with top and sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140617#M38864</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;All I want do is to convert the below stats table into a timerange result.&lt;BR /&gt;
I'm using a LDAP log and getting the top 20 entries values and sorting it based on nentries&lt;/P&gt;

&lt;P&gt;index="q_ldap" | top limit=0 nentries | sort 20 -nentries&lt;BR /&gt;
(this works like a charm)&lt;BR /&gt;
nentries count&lt;BR /&gt;
2345     9&lt;BR /&gt;
234      8&lt;BR /&gt;
23       7&lt;BR /&gt;
2        11&lt;BR /&gt;
1        100&lt;BR /&gt;
.       .&lt;BR /&gt;
.       .&lt;BR /&gt;
.       .&lt;BR /&gt;
No I want to convert this to timeseries, where I need to the see the count for the largest nentries value over time.&lt;/P&gt;

&lt;P&gt;Im trying below query, but no luck and Im scratching my head how to combine timechart and sort, any help would be highly appreciated.&lt;/P&gt;

&lt;P&gt;index="q_ldap"  | sort 20 -nentries| timechart limit=20 span=10m count by nentries&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 18:24:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140617#M38864</guid>
      <dc:creator>xbbj3nj</dc:creator>
      <dc:date>2014-04-23T18:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart along with top and sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140618#M38865</link>
      <description>&lt;P&gt;you loose timechart or you have to give up on sort both will not make sense.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="q_ldap" [|search index="q_ldap" |dedup nentries|sort -nentries|head 20|table nentries]|timechart count by nentries
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Updated: I have  filtered out the entries from the parent dataset for the top 20 sorted nentries&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 19:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140618#M38865</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-23T19:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart along with top and sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140619#M38866</link>
      <description>&lt;P&gt;Thanks for that .. but to be clear on my need.. I'm filtering the whole lot of nentries 1st and then trying to sort based on the values of nentries, ie largest and not it's count.... so How do I apply filter for largest values in timechart ? say the result is 0,1,2,5,78,100,23,350...... and i want to show only the largest value in the timechart.. i.e 350,100,78 out of all&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 19:31:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140619#M38866</guid>
      <dc:creator>xbbj3nj</dc:creator>
      <dc:date>2014-04-23T19:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart along with top and sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140620#M38867</link>
      <description>&lt;P&gt;I have made some changes could you try it?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 19:49:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140620#M38867</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-23T19:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart along with top and sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140621#M38868</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/142467"&gt;@linu1988&lt;/a&gt; : Thank you so much, I had to do a minor tweak of your query to get my desired results&lt;/P&gt;

&lt;P&gt;index="q_ldap"[|search index="q_ldap" |dedup nentries|sort 20 -nentries |head 20| table nentries ]| timechart limit=20 useother=f usenull=f count by nentries | sort by nentries&lt;/P&gt;

&lt;P&gt;Thanks Again !!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:27:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140621#M38868</guid>
      <dc:creator>xbbj3nj</dc:creator>
      <dc:date>2020-09-28T16:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart along with top and sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140622#M38869</link>
      <description>&lt;P&gt;Feel free to mark it as answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2014 06:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140622#M38869</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-24T06:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart along with top and sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140623#M38870</link>
      <description>&lt;P&gt;sorry to interfere here &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
I think this is a bit over done and can be reduced to a single search like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index="q_ldap" | dedup nentries | sort -nentries | head 20 | timechart count by nentries&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;it works with a run everywhere example like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal source=*metrics.log | dedup kb | sort 20 -kb | head 20 | timechart count by kb&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2014 07:35:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140623#M38870</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-04-24T07:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart along with top and sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140624#M38871</link>
      <description>&lt;P&gt;dedup nentries will take out all the time entries which has happened before, only latest one will be kept for search, won't it? so it's important to have the sub search to get the entries upon which the timechart will be done. Correct me if i am wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2014 21:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-along-with-top-and-sort/m-p/140624#M38871</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-28T21:11:42Z</dc:date>
    </item>
  </channel>
</rss>

