<?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: chopping up lastlog in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55872#M179809</link>
    <description>&lt;P&gt;Is this what you're looking for?:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os sourcetype=lastlog|multikv|table host,LATEST,FROM,USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Jun 2013 20:02:20 GMT</pubDate>
    <dc:creator>glitchcowboy</dc:creator>
    <dc:date>2013-06-07T20:02:20Z</dc:date>
    <item>
      <title>chopping up lastlog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55871#M179808</link>
      <description>&lt;P&gt;I have managed to get our linux hosts' lastlog data in our Splunk&amp;gt; (&lt;STRONG&gt;version 5.0.2&lt;/STRONG&gt;, build 149561) easily enough, but what I am trying to accomplish (with any additional app installs, thanks) is "chop up" the lastlog results into a &lt;BR /&gt;
chart by host, user, ip and date.&lt;/P&gt;

&lt;P&gt;I tried at Extract Fields on the results and could NOT get it to recognize a list of 40 names? &lt;BR /&gt;
20 Most Common and 20 'Random' names either together or separately both return "No regex could be learned. Try providing different examples or restriction."&lt;/P&gt;

&lt;P&gt;I tried the &lt;EM&gt;actual&lt;/EM&gt; names from "sample events" and it just barks the same message.&lt;BR /&gt;
Even the simple names list (Lucy Ricky Fred Ethel) fails.&lt;/P&gt;

&lt;P&gt;We have the Splunk_TA_nix installed.&lt;/P&gt;

&lt;P&gt;Sample data via splunk shows:&lt;/P&gt;

&lt;P&gt;USERNAME                        FROM                            LATEST&lt;BR /&gt;&lt;BR /&gt;
root                                  xx.xxx.61.95                    Jun 5 06:15:58 2013&lt;BR /&gt;&lt;BR /&gt;
some_user                       isp-24-249-207-            Jun 4 08:03:29 2013&lt;BR /&gt;&lt;BR /&gt;
another_user                    what.ever                  Jun 2 13:00:15 2013&lt;/P&gt;

&lt;P&gt;Edit: Wed Jun 05, 2013 -  1:01:38 PM EDT&lt;BR /&gt;&lt;BR /&gt;
Extracted Fields vs Indexed Fields...so I want to &lt;EM&gt;extract&lt;/EM&gt; the usernames from the output of&lt;BR /&gt;&lt;BR /&gt;
sourcetype="lastlog" host="*"&lt;/P&gt;

&lt;P&gt;Fri Jun 07, 2013 -  2:22:40 PM EDT&lt;BR /&gt;
Some progress...&lt;BR /&gt;
\w+\s+\w+\s+\w+\s+(?P&lt;FIELDNAME1&gt;[^ ]+)&lt;BR /&gt;
but this only grabs "root" and one other username&lt;BR /&gt;
so, still banging away...&lt;/FIELDNAME1&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2013 15:28:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55871#M179808</guid>
      <dc:creator>JJ_of_c9</dc:creator>
      <dc:date>2013-06-05T15:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: chopping up lastlog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55872#M179809</link>
      <description>&lt;P&gt;Is this what you're looking for?:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os sourcetype=lastlog|multikv|table host,LATEST,FROM,USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jun 2013 20:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55872#M179809</guid>
      <dc:creator>glitchcowboy</dc:creator>
      <dc:date>2013-06-07T20:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: chopping up lastlog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55873#M179810</link>
      <description>&lt;P&gt;Very close and it gives me so much to work with. I can shape the output further thanks to you and this working example.&lt;BR /&gt;&lt;BR /&gt;
sourcetype="lastlog"| multikv|table host,USERNAME,LATEST,FROM | dedup host sortby lastlogin_time | table host,USERNAME,LATEST,FROM&lt;/P&gt;

&lt;P&gt;Thank you very much!&lt;BR /&gt;&lt;BR /&gt;
John Jones of&lt;BR /&gt;&lt;BR /&gt;
cirrhus9.com&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2013 20:48:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55873#M179810</guid>
      <dc:creator>JJ_of_c9</dc:creator>
      <dc:date>2013-06-07T20:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: chopping up lastlog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55874#M179811</link>
      <description>&lt;P&gt;jj: if glitch's answer solved your problem, please accept his answer by checking the checkbox. thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2013 22:33:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55874#M179811</guid>
      <dc:creator>piebob</dc:creator>
      <dc:date>2013-06-07T22:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: chopping up lastlog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55875#M179812</link>
      <description>&lt;P&gt;I also found this format to be useful and easy to read.&lt;/P&gt;

&lt;P&gt;sourcetype="lastlog" |dedup host| multikv |stats list(USERNAME) AS login_user, list(LATEST) AS login_time  by host&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:52:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chopping-up-lastlog/m-p/55875#M179812</guid>
      <dc:creator>mike11339</dc:creator>
      <dc:date>2020-09-29T08:52:08Z</dc:date>
    </item>
  </channel>
</rss>

