<?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 group and count first and last timestamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/524120#M147873</link>
    <description>&lt;P&gt;Yes, it works fine! A summary for others:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host="xxxxxxx" 
     | rex "time\":\"(?&amp;lt;time&amp;gt;[^\"]+)"
     | rex "fullname\":\"(?&amp;lt;fullname&amp;gt;[^\"]+)"
     | rex "confname\":\"(?&amp;lt;confname&amp;gt;[^\"]+)"
| stats earliest(_time) as "Time Start" latest(_time) as "Time Stop" by fullname, confname
 | fieldformat "Time Start"=strftime('Time Start',"%Y-%m-%dT%H:%M:%S.%Q")
| fieldformat "Time Stop"=strftime('Time Stop',"%Y-%m-%dT%H:%M:%S.%Q")&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 11 Oct 2020 19:57:46 GMT</pubDate>
    <dc:creator>glm_cybaze</dc:creator>
    <dc:date>2020-10-11T19:57:46Z</dc:date>
    <item>
      <title>How to group and count first and last timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/523899#M147807</link>
      <description>&lt;P&gt;Hi to everyone,&lt;/P&gt;&lt;P&gt;I have some trouble on setting a correct output for a search query.&lt;/P&gt;&lt;P&gt;This is the start situation of the logs:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="splunk_screen_1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11228i97BDE7DA81C95A14/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk_screen_1.jpg" alt="splunk_screen_1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I've created a regex for a cleaner situation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host="xxxxx" 
     | rex "time\":\"(?&amp;lt;time&amp;gt;[^\"]+)"
     | rex "fullname\":\"(?&amp;lt;fullname&amp;gt;[^\"]+)"
     | rex "confname\":\"(?&amp;lt;confname&amp;gt;[^\"]+)"
     | table time, fullname, confname&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So now i have this situation:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk_screen_2.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11229i52108BDA707271EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk_screen_2.jpg" alt="splunk_screen_2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It's clear but i need a situation where i can see the first and last time a user login (the system logs timestamp for users as long as the user is logged)&lt;/P&gt;&lt;P&gt;something like: Time start | Time Stop | full name | confname&lt;BR /&gt;Someone has a some suggestions?&lt;/P&gt;&lt;P&gt;p.s.&lt;BR /&gt;For helping others people in my situation, this is the logs of Big Blue Button software&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 12:04:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/523899#M147807</guid>
      <dc:creator>glm_cybaze</dc:creator>
      <dc:date>2020-10-09T12:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to group and count first and last timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/523926#M147821</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats earliest(_time) as "Time Start" latest(_time) as "Time Stop" by fullname, confname &lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Oct 2020 13:41:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/523926#M147821</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-09T13:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to group and count first and last timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/524101#M147866</link>
      <description>&lt;P&gt;Hi tanks,&lt;/P&gt;&lt;P&gt;I replaced the string&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table time_first, time_last, fullname, confname&lt;/LI-CODE&gt;&lt;P&gt;With&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats earliest(_time) as "Time Start" latest(_time) as "Time Stop" by fullname, confname &lt;/LI-CODE&gt;&lt;P&gt;Result is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk_screen_3.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11239i19628880EE51F330/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk_screen_3.jpg" alt="splunk_screen_3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think because the timestamp is: 2020-10-10T12:14:06.969Z&lt;BR /&gt;any suggestion?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Oct 2020 16:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/524101#M147866</guid>
      <dc:creator>glm_cybaze</dc:creator>
      <dc:date>2020-10-11T16:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to group and count first and last timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/524107#M147868</link>
      <description>&lt;P&gt;Is it that you want the timestamps displayed as date time?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fieldformat 'Time Start'=strftime('Time Start',"%Y-%m-%dT%H:%M:%S.%Q")
| fieldformat 'Time Stop'=strftime('Time Stop',"%Y-%m-%dT%H:%M:%S.%Q")&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 11 Oct 2020 17:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/524107#M147868</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-11T17:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to group and count first and last timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/524120#M147873</link>
      <description>&lt;P&gt;Yes, it works fine! A summary for others:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host="xxxxxxx" 
     | rex "time\":\"(?&amp;lt;time&amp;gt;[^\"]+)"
     | rex "fullname\":\"(?&amp;lt;fullname&amp;gt;[^\"]+)"
     | rex "confname\":\"(?&amp;lt;confname&amp;gt;[^\"]+)"
| stats earliest(_time) as "Time Start" latest(_time) as "Time Stop" by fullname, confname
 | fieldformat "Time Start"=strftime('Time Start',"%Y-%m-%dT%H:%M:%S.%Q")
| fieldformat "Time Stop"=strftime('Time Stop',"%Y-%m-%dT%H:%M:%S.%Q")&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 11 Oct 2020 19:57:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-and-count-first-and-last-timestamp/m-p/524120#M147873</guid>
      <dc:creator>glm_cybaze</dc:creator>
      <dc:date>2020-10-11T19:57:46Z</dc:date>
    </item>
  </channel>
</rss>

