<?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: Sort highest to lowest over time with timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345119#M102256</link>
    <description>&lt;P&gt;Hi &lt;A href="mailto:patrick.okeeffe@icbc.com"&gt;patrick.okeeffe@icbc.com&lt;/A&gt;,&lt;BR /&gt;
I agree with @DalJeanis that i following yourrequest you loose the time vision of you events.&lt;BR /&gt;
Anyway I had a customer that asked to me something near your request and I solved in this way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*access.log GET sourcetype=splunk_web_access 
| search "/app/" 
| rex field=_raw "\/app\/(?&amp;lt;appName&amp;gt;\S+)\/" 
| bin span=1d _time
| search appName!=launcher OR appName!=search
| eval column=appName+" "+strftime(_time,"%Y-%m-%d %H:%M:%S")
| stats count by column 
| sort -count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2017 08:05:23 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-11-07T08:05:23Z</dc:date>
    <item>
      <title>Sort highest to lowest over time with timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345117#M102254</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to display a graph of the my Splunk applications by usage, highest to lowest within a given time period. Can I sort so I can see highest on the left to lowest over say 7 days. This is what I have now:&lt;/P&gt;

&lt;P&gt;index=_internal source=*access.log GET sourcetype=splunk_web_access &lt;BR /&gt;
| search "/app/" &lt;BR /&gt;
| rex field=_raw "\/app\/(?\S+)\/" &lt;BR /&gt;
| timechart span=1d count by appName usenull=f useother=f &lt;BR /&gt;
| fields - launcher, search&lt;/P&gt;

&lt;P&gt;I tried sorting by appName, count etc but no change.&lt;/P&gt;

&lt;P&gt;here is what the current timechart looks like:&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/218703-graph.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:34:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345117#M102254</guid>
      <dc:creator>patrick_okeeffe</dc:creator>
      <dc:date>2020-09-29T16:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sort highest to lowest over time with timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345118#M102255</link>
      <description>&lt;P&gt;What you are asking for doesn't make much sense to me.  &lt;CODE&gt;timechart&lt;/CODE&gt; is charting over a period of time... that is what determines left vs right. &lt;/P&gt;

&lt;P&gt;I don't believe you can have each day sort from highest to lowest, retaining color...That would lose the visual anchoring that tells you which color orange is which series, and multiple oranges or blues would end up next to each other, making it even more difficult to read.  &lt;/P&gt;

&lt;P&gt;You might consider switching to a line chart rather than a bar chart, since with this data that would be more understandable.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 02:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345118#M102255</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-11-07T02:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sort highest to lowest over time with timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345119#M102256</link>
      <description>&lt;P&gt;Hi &lt;A href="mailto:patrick.okeeffe@icbc.com"&gt;patrick.okeeffe@icbc.com&lt;/A&gt;,&lt;BR /&gt;
I agree with @DalJeanis that i following yourrequest you loose the time vision of you events.&lt;BR /&gt;
Anyway I had a customer that asked to me something near your request and I solved in this way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*access.log GET sourcetype=splunk_web_access 
| search "/app/" 
| rex field=_raw "\/app\/(?&amp;lt;appName&amp;gt;\S+)\/" 
| bin span=1d _time
| search appName!=launcher OR appName!=search
| eval column=appName+" "+strftime(_time,"%Y-%m-%d %H:%M:%S")
| stats count by column 
| sort -count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 08:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345119#M102256</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-07T08:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sort highest to lowest over time with timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345120#M102257</link>
      <description>&lt;P&gt;Thank you both. Appreciate the feedback.&lt;/P&gt;

&lt;P&gt;I was thinking it would be visually easier to use a bar chart that showed me the highest to lowest, left to right within any given day. But the line chart makes sense.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 16:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-highest-to-lowest-over-time-with-timechart/m-p/345120#M102257</guid>
      <dc:creator>patrick_okeeffe</dc:creator>
      <dc:date>2017-11-07T16:59:55Z</dc:date>
    </item>
  </channel>
</rss>

