<?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 edit my search to sort by date, time, and user? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256136#M76688</link>
    <description>&lt;P&gt;Hi, and thanks again for your help. I've attached a screenshot of the output. What it appears to be doing is listing the users alphabetically, and then each user's latest failed logins.  I was hoping to get the latest failed logins, and their associated user.&lt;IMG src="http://i68.tinypic.com/2hygwt1.png" alt="alt text" /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Aug 2016 21:41:16 GMT</pubDate>
    <dc:creator>HCadmins</dc:creator>
    <dc:date>2016-08-31T21:41:16Z</dc:date>
    <item>
      <title>How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256131#M76683</link>
      <description>&lt;P&gt;Hi Splunk Answers!&lt;/P&gt;

&lt;P&gt;I'm new to Splunk. I am trying to create a statistics table that shows our VPN users, their failed logins, and a timestamp.&lt;/P&gt;

&lt;P&gt;My current search string is this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=* sourcetype=UTM:system sub=auth name="Authentication failed" AND "Authentication Failed" | convert timeformat="%m-%d-%y %I:%M %p" ctime(_time) as thetime | stats list(thetime) as "Timestamp" by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any sorting I append to the end of that search string doesn't sort by the newest date/time. Preferably, I'd like to see the top ten latest failed authentications by user. &lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 19:54:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256131#M76683</guid>
      <dc:creator>HCadmins</dc:creator>
      <dc:date>2016-08-31T19:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256132#M76684</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=* sourcetype=UTM:system sub=auth name="Authentication failed" AND "Authentication Failed" | dedup 10 user | convert timeformat="%m-%d-%y %I:%M %p" ctime(_time) as thetime | stats list(thetime) as "Timestamp" by user
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 21:07:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256132#M76684</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-31T21:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256133#M76685</link>
      <description>&lt;P&gt;Hi, thanks for the answer. It's still grouping the events by user and not by time. &lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 21:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256133#M76685</guid>
      <dc:creator>HCadmins</dc:creator>
      <dc:date>2016-08-31T21:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256134#M76686</link>
      <description>&lt;P&gt;The query should be showing top 10 latest failed (generated by dedup) authentication entries for every user, as per your requirement. If the sorting of the Timestamp is off, then try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=* sourcetype=UTM:system sub=auth name="Authentication failed" AND "Authentication Failed" | dedup 10 user  | stats list(_time) as "Timestamp" by user | eval Timestamp=mvsort(Timestamp)| convert timeformat="%m-%d-%y %I:%M %p" ctime(Timestamp) as Timestamp 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 21:33:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256134#M76686</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-31T21:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256135#M76687</link>
      <description>&lt;P&gt;Or provide some sample expected output and current output?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 21:34:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256135#M76687</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-31T21:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256136#M76688</link>
      <description>&lt;P&gt;Hi, and thanks again for your help. I've attached a screenshot of the output. What it appears to be doing is listing the users alphabetically, and then each user's latest failed logins.  I was hoping to get the latest failed logins, and their associated user.&lt;IMG src="http://i68.tinypic.com/2hygwt1.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 21:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256136#M76688</guid>
      <dc:creator>HCadmins</dc:creator>
      <dc:date>2016-08-31T21:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256137#M76689</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=* sourcetype=UTM:system sub=auth name="Authentication failed" AND "Authentication Failed" | convert timeformat="%m-%d-%y %I:%M %p" ctime(_time) as thetime | sort thetime | streamstats count by user | where count&amp;lt;=10 | stats list(thetime) as "Timestamp" by user
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 22:06:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256137#M76689</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-31T22:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256138#M76690</link>
      <description>&lt;P&gt;Hi, and thanks. This string gives the same result as the above result. It lists users alphabetically, then their associated failed logins by time. I'm interested in the 10 most recent failed login attempts and their associated users.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 22:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256138#M76690</guid>
      <dc:creator>HCadmins</dc:creator>
      <dc:date>2016-08-31T22:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256139#M76691</link>
      <description>&lt;P&gt;It may be simple as this. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; host=* sourcetype=UTM:system sub=auth name="Authentication failed" AND "Authentication Failed" | head 10 | table user _time | eval Timestamp=strftime(_time,"%m-%d-%y %I:%M %p") | table user Timestamp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 22:14:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256139#M76691</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-31T22:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to sort by date, time, and user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256140#M76692</link>
      <description>&lt;P&gt;Okay, I think that worked. Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 17:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-sort-by-date-time-and-user/m-p/256140#M76692</guid>
      <dc:creator>HCadmins</dc:creator>
      <dc:date>2016-09-01T17:26:44Z</dc:date>
    </item>
  </channel>
</rss>

