<?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 extract a list of unique users in a search and table count of successful and failed logins? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-list-of-unique-users-in-a-search-and-table/m-p/128870#M35006</link>
    <description>&lt;P&gt;First, you need to extract usernames into a field, lets say "USER" after which you can achieve the statistics you want&lt;/P&gt;

&lt;PRE&gt;
index=spss " Login succeeded for user: " | rex "(?i)user: (?P&amp;lt;USER&amp;gt;.*)"
&lt;/PRE&gt;

&lt;P&gt;Unique List of users&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
index=spss " Login succeeded for user: " earliest=-24h@h | rex "(?i)user: (?P&amp;lt;USER&amp;gt;.*)" | dedup USER | table USER&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Number of occurrences of each user within 24hrs&lt;/P&gt;

&lt;PRE&gt;
index=spss " Login succeeded for user: " earliest=-24h@h  | rex "(?i)user: (?P&amp;lt;USER&amp;gt;.*)" | stats count by USER
&lt;/PRE&gt;</description>
    <pubDate>Wed, 17 Sep 2014 19:30:21 GMT</pubDate>
    <dc:creator>pradeepkumarg</dc:creator>
    <dc:date>2014-09-17T19:30:21Z</dc:date>
    <item>
      <title>How to extract a list of unique users in a search and table count of successful and failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-list-of-unique-users-in-a-search-and-table/m-p/128869#M35005</link>
      <description>&lt;P&gt;This is my first time using splunk and I have 2 questions. First of all, say I have when I enter a certain search (" Login succeeded for user: ") I get the following 4 values.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Login succeeded for user: a1b2&lt;/LI&gt;
&lt;LI&gt;Login succeeded for user: c3d4&lt;/LI&gt;
&lt;LI&gt;Login succeeded for user: e5f6&lt;/LI&gt;
&lt;LI&gt;Login succeeded for user: a1b2&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Is there a way that I can modify this query so that I can get a list of unique users (e.g. a1b2, c3d4, e5f6)? Essentially, as soon as the log finds one user, I want it to discard any other result that comes back with the same user.  I do not have access to the props file and so I don't think that I can modify indexes on a permanent basis.&lt;/P&gt;

&lt;P&gt;Secondly, is there a way that I can take 2 related queries (index=spss " Login succeeded for user: ") and (index=spss " Login failed for user: ") and get a count of how many times each one has occurred in the timeframe (e.g. 24 hours)? I'd like to be able to put those two numbers next to each other in a graph or table.&lt;/P&gt;

&lt;P&gt;Thanks in advance! I look forward to using this tool (platform?)&lt;/P&gt;

&lt;P&gt;I am running splunk 5.0.9&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2014 18:41:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-list-of-unique-users-in-a-search-and-table/m-p/128869#M35005</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2014-09-17T18:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a list of unique users in a search and table count of successful and failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-list-of-unique-users-in-a-search-and-table/m-p/128870#M35006</link>
      <description>&lt;P&gt;First, you need to extract usernames into a field, lets say "USER" after which you can achieve the statistics you want&lt;/P&gt;

&lt;PRE&gt;
index=spss " Login succeeded for user: " | rex "(?i)user: (?P&amp;lt;USER&amp;gt;.*)"
&lt;/PRE&gt;

&lt;P&gt;Unique List of users&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
index=spss " Login succeeded for user: " earliest=-24h@h | rex "(?i)user: (?P&amp;lt;USER&amp;gt;.*)" | dedup USER | table USER&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Number of occurrences of each user within 24hrs&lt;/P&gt;

&lt;PRE&gt;
index=spss " Login succeeded for user: " earliest=-24h@h  | rex "(?i)user: (?P&amp;lt;USER&amp;gt;.*)" | stats count by USER
&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Sep 2014 19:30:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-list-of-unique-users-in-a-search-and-table/m-p/128870#M35006</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2014-09-17T19:30:21Z</dc:date>
    </item>
  </channel>
</rss>

