<?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 how to search events with a common value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359460#M106273</link>
    <description>&lt;P&gt;Hi to all,&lt;/P&gt;

&lt;P&gt;I need to find if a user performs a login and a logout in 15 seconds performed by the same user (same cookie value)&lt;/P&gt;

&lt;P&gt;I set this search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=access_logs action=login OR action=logout | transaction cookie maxspan=15s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It returns only action login or logout but not with the same cookie and not in the last 15 seconds.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 16:11:07 GMT</pubDate>
    <dc:creator>andreac81</dc:creator>
    <dc:date>2017-06-20T16:11:07Z</dc:date>
    <item>
      <title>how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359460#M106273</link>
      <description>&lt;P&gt;Hi to all,&lt;/P&gt;

&lt;P&gt;I need to find if a user performs a login and a logout in 15 seconds performed by the same user (same cookie value)&lt;/P&gt;

&lt;P&gt;I set this search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=access_logs action=login OR action=logout | transaction cookie maxspan=15s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It returns only action login or logout but not with the same cookie and not in the last 15 seconds.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 16:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359460#M106273</guid>
      <dc:creator>andreac81</dc:creator>
      <dc:date>2017-06-20T16:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359461#M106274</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=access_logs action=login OR action=logout | transaction cookie maxspan=15s startswith=action=login endswith=action=logout keeporphan=f
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 16:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359461#M106274</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-20T16:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359462#M106275</link>
      <description>&lt;P&gt;If all events cntain the cookie field you can use stats. Something like this might work: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=access_logs action=login OR action=logout 
| stats latest(_time) as latest earliest(_time) as earliest by cookie 
| eval session_time=latest-earliest 
| where session_time&amp;lt;16
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 16:26:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359462#M106275</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2017-06-20T16:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359463#M106276</link>
      <description>&lt;P&gt;Thanks a lot.&lt;BR /&gt;
How should I change the search in order to find events in last 15 minutes instead of last 15 seconds?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Andrea&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 09:09:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359463#M106276</guid>
      <dc:creator>andreac81</dc:creator>
      <dc:date>2017-06-21T09:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359464#M106277</link>
      <description>&lt;P&gt;Assuming I have understood you correctly, session_time&amp;lt;901  (ie 15 minutes and 1 second) &lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 11:09:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359464#M106277</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2017-06-21T11:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359465#M106278</link>
      <description>&lt;P&gt;I better tested  the search&lt;BR /&gt;
     tag=access_logs action=login OR action=logout &lt;BR /&gt;
     | stats latest(_time) as latest earliest(_time) as earliest by cookie &lt;BR /&gt;
     | eval session_time=latest-earliest &lt;BR /&gt;
     | where session_time&amp;lt;16&lt;BR /&gt;
but it returns the session time of the single action (i.e. session time of login), instead I need the session time beetween login and logout, how can I modify the search?&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Andrea&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:33:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359465#M106278</guid>
      <dc:creator>andreac81</dc:creator>
      <dc:date>2020-09-29T14:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359466#M106279</link>
      <description>&lt;P&gt;It\s hard without seeing your data.  The search should be calculating the difference between the _time value of the login event and the _time value of the logout event. Is that what you mean by session time? Or are you referring to something else.  &lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 08:48:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359466#M106279</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2017-06-22T08:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359467#M106280</link>
      <description>&lt;P&gt;It's correct " The search should be calculating the difference between the _time value of the login event and the _time value of the logout event for events with same cookie"&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 08:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359467#M106280</guid>
      <dc:creator>andreac81</dc:creator>
      <dc:date>2017-06-22T08:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to search events with a common value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359468#M106281</link>
      <description>&lt;P&gt;Yes so that it what my search will calculate. When you say "but it returns the session time of the single action " what value do you actually see? &lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 12:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-events-with-a-common-value/m-p/359468#M106281</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2017-06-22T12:13:22Z</dc:date>
    </item>
  </channel>
</rss>

