<?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: Query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582339#M202834</link>
    <description>&lt;P&gt;These doubts are variations on the same theme as are the solutions.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;One more doubt, i got Now last logout name of employee ,but supposed after some time he logged in again now i need to remove this user from my logout list. Can you please help me.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;LI-CODE lang="markup"&gt;index=foo (status=logout OR status=logon)
```Find the most recent login/logout event for each employee```
| dedup name
```Keep only the logouts.  All others are still logged on.```
| where status=logout&lt;/LI-CODE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Supposed i have employees data status Like login logout. I need to calculate the how many employee logged in and logged out.&amp;nbsp;&lt;/BLOCKQUOTE&gt;&lt;LI-CODE lang="markup"&gt;index=foo (status=logon OR status=logout)
| stats count by status&lt;/LI-CODE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;3 employees login and from that 3 employee One log out. Now I need to count in logout list. Suppose again the same employee login i need to push it into login list and remove from logout list likewise&amp;nbsp;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;LI-CODE lang="markup"&gt;index=foo (status=logon OR status=logout)
```Show who is logged in and who is logged out```
| stats values(name) as names by status&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jan 2022 00:38:30 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-01-25T00:38:30Z</dc:date>
    <item>
      <title>Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582262#M202810</link>
      <description>&lt;P&gt;Supposed if i have huge data off employees Like name department and status (login /logout )&lt;/P&gt;&lt;P&gt;One person can login and logout many times in One day.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to find out last logout time for each employee&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:40:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582262#M202810</guid>
      <dc:creator>kajalchopade071</dc:creator>
      <dc:date>2022-01-24T14:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582273#M202817</link>
      <description>&lt;P&gt;Search for logouts then take the most recent one for each employee.&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;dedup&lt;/FONT&gt; command keeps the most recent event for each specified field value (employee name, in this case).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=foo status=logout
| dedup name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 15:31:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582273#M202817</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-24T15:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582279#M202819</link>
      <description>&lt;P&gt;Thank you so much for the help it return correct values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more doubt, i got Now last logout name of employee ,but supposed after some time he logged in again now i need to remove this user from my logout list. Can you please help me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Supposed i have employees data status Like login logout. I need to calculate the how many employee logged in and logged out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 employees login and from that 3 employee One log out. Now I need to count in logout list. Suppose again the same employee login i need to push it into login list and remove from logout list likewise&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 16:04:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582279#M202819</guid>
      <dc:creator>kajalchopade071</dc:creator>
      <dc:date>2022-01-24T16:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582339#M202834</link>
      <description>&lt;P&gt;These doubts are variations on the same theme as are the solutions.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;One more doubt, i got Now last logout name of employee ,but supposed after some time he logged in again now i need to remove this user from my logout list. Can you please help me.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;LI-CODE lang="markup"&gt;index=foo (status=logout OR status=logon)
```Find the most recent login/logout event for each employee```
| dedup name
```Keep only the logouts.  All others are still logged on.```
| where status=logout&lt;/LI-CODE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Supposed i have employees data status Like login logout. I need to calculate the how many employee logged in and logged out.&amp;nbsp;&lt;/BLOCKQUOTE&gt;&lt;LI-CODE lang="markup"&gt;index=foo (status=logon OR status=logout)
| stats count by status&lt;/LI-CODE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;3 employees login and from that 3 employee One log out. Now I need to count in logout list. Suppose again the same employee login i need to push it into login list and remove from logout list likewise&amp;nbsp;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;LI-CODE lang="markup"&gt;index=foo (status=logon OR status=logout)
```Show who is logged in and who is logged out```
| stats values(name) as names by status&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 00:38:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582339#M202834</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-25T00:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582354#M202838</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 05:36:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query/m-p/582354#M202838</guid>
      <dc:creator>kajalchopade071</dc:creator>
      <dc:date>2022-01-25T05:36:57Z</dc:date>
    </item>
  </channel>
</rss>

