<?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 can I sort the order of my sources to appear in my chart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132434#M36135</link>
    <description>&lt;P&gt;Use the search below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=win_srv_perf host=host  (source="Perfmon:FreeDiskSpace" OR source="Perfmon:LogicalDisk" OR source="Perfmon:LocalNetwork") |eval Time = strftime(_time,"%Y_%m_%B") | chart count by source Time | addtotals | sort -Total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;|eval Time = strftime(_time,"%Y_%m_%B")&lt;/CODE&gt; you get&lt;BR /&gt;
2015_05_May &lt;BR /&gt;
2015_06_June&lt;BR /&gt;&lt;BR /&gt;
2015_07_July&lt;/P&gt;

&lt;P&gt;now you get correct order&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 06:46:21 GMT</pubDate>
    <dc:creator>senthilgoa</dc:creator>
    <dc:date>2020-09-29T06:46:21Z</dc:date>
    <item>
      <title>How can I sort the order of my sources to appear in my chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132432#M36133</link>
      <description>&lt;P&gt;Hoping someone can help me out. This is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| metadata type=sources index="test_inputs" | search source="GAL Servers ALL*" | sort recentTime desc | head 3 | fields source] search Type="Vuln" Severity="4" OR Severity="5"| chart count by Business_Service source | addtotals | sort -Total | fields - Total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And it returns this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/482i063E850309B64D7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Currently each column is a different source, so 3 in total, called May 2015, June 2015, July 2015.&lt;/P&gt;

&lt;P&gt;The problem that i have is that on my chart, it's displaying as July 2015, June 2015, May 2015.&lt;/P&gt;

&lt;P&gt;How can i alter the search so it's displaying correctly?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2015 12:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132432#M36133</guid>
      <dc:creator>MichaelPriest</dc:creator>
      <dc:date>2015-07-22T12:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I sort the order of my sources to appear in my chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132433#M36134</link>
      <description>&lt;P&gt;The search has changed to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test_inputs" source="GAL Servers ALL*" Type="Vuln" (Severity="4" OR Severity="5")| chart count by Business_Service source | addtotals | sort -Total | fields - Total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jul 2015 13:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132433#M36134</guid>
      <dc:creator>MichaelPriest</dc:creator>
      <dc:date>2015-07-22T13:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I sort the order of my sources to appear in my chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132434#M36135</link>
      <description>&lt;P&gt;Use the search below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=win_srv_perf host=host  (source="Perfmon:FreeDiskSpace" OR source="Perfmon:LogicalDisk" OR source="Perfmon:LocalNetwork") |eval Time = strftime(_time,"%Y_%m_%B") | chart count by source Time | addtotals | sort -Total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;|eval Time = strftime(_time,"%Y_%m_%B")&lt;/CODE&gt; you get&lt;BR /&gt;
2015_05_May &lt;BR /&gt;
2015_06_June&lt;BR /&gt;&lt;BR /&gt;
2015_07_July&lt;/P&gt;

&lt;P&gt;now you get correct order&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:46:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132434#M36135</guid>
      <dc:creator>senthilgoa</dc:creator>
      <dc:date>2020-09-29T06:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I sort the order of my sources to appear in my chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132435#M36136</link>
      <description>&lt;P&gt;This didn't work i'm afraid. It needs to be by source and business_service in the chart command. Any other suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2015 15:21:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132435#M36136</guid>
      <dc:creator>MichaelPriest</dc:creator>
      <dc:date>2015-07-22T15:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I sort the order of my sources to appear in my chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132436#M36137</link>
      <description>&lt;P&gt;instead of source and business_service  i used  source and Time. you will change according to your fields&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2015 15:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132436#M36137</guid>
      <dc:creator>senthilgoa</dc:creator>
      <dc:date>2015-07-22T15:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I sort the order of my sources to appear in my chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132437#M36138</link>
      <description>&lt;P&gt;Yes i tried your way and it ordered the sources correctly, i.e. May June July. But it only gave me a overall total for each source. I want to see each source by business_service. it will be broken down by 3:&lt;/P&gt;

&lt;P&gt;for each source get the total count by business_service and order it by Time (so it displays it as May June July)&lt;/P&gt;

&lt;P&gt;If i need to give more clarity let me know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2015 15:56:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132437#M36138</guid>
      <dc:creator>MichaelPriest</dc:creator>
      <dc:date>2015-07-22T15:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I sort the order of my sources to appear in my chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132438#M36139</link>
      <description>&lt;P&gt;You can use &lt;CODE&gt;fields&lt;/CODE&gt; to manually reorder them OR you can create another field, sort by it, and then remove it like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test_inputs" source="GAL Servers ALL*" Type="Vuln" (Severity="4" OR Severity="5")| chart count by Business_Service source | addtotals | sort -Total | fields - Total | eval Time=strptime(Business_Service, "%B %Y") | sort 0 Time | fields - Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jul 2015 19:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132438#M36139</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-24T19:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I sort the order of my sources to appear in my chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132439#M36140</link>
      <description>&lt;P&gt;This should do the trick&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| metadata type=sources index="test_inputs" | search source="GAL Servers ALL*" | sort recentTime desc | head 3 | fields source] search Type="Vuln" Severity="4" OR Severity="5"| chart count by Business_Service source | addtotals | sort -Total | table Business_Service [| metadata type=sources index="test_inputs" | search source="GAL Servers ALL*" | sort recentTime desc | head 3 | fields source | eval epoch=strptime(source,"%B %Y") | sort epoch asc | stats list(source) as source delim="," | nomv source | return $source]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jul 2015 22:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-sort-the-order-of-my-sources-to-appear-in-my-chart/m-p/132439#M36140</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-07-24T22:36:48Z</dc:date>
    </item>
  </channel>
</rss>

