<?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 together events based on their relative distance in _time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-together-events-based-on-their-relative-distance-in/m-p/191413#M55115</link>
    <description>&lt;P&gt;The transaction command did it. Though I will say it adds a LOT of overhead and makes some of our searches impossible over more than a few minutes. It does however do the same as the above initial search AND ensures they all happened within 1 second of each other.&lt;/P&gt;

&lt;P&gt;I can now say "Someone logged into 3 different servers within one second, and here is your single alert showing you so".&lt;/P&gt;

&lt;P&gt;sourcetype=logins login_server="server_01" login_server="server_02" login_server="server_03"  | transaction fields="HostName" maxspan=1s | eval UniqueServers=mvcount(login_server) | where UniqueServers &amp;gt; 1&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:51:32 GMT</pubDate>
    <dc:creator>thisissplunk</dc:creator>
    <dc:date>2020-09-28T16:51:32Z</dc:date>
    <item>
      <title>How to group together events based on their relative distance in _time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-together-events-based-on-their-relative-distance-in/m-p/191411#M55113</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;I'm trying to figure out how to group certain events together if they happen within 1 second of each other's relative _time (they happened &amp;lt;= one second from each other).&lt;/P&gt;

&lt;P&gt;Current search as an example example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=logins login_server="server_01" login_server="server_02" login_server="server_03"  | stats  values(login_server) count(login_server) AS UniqueEventCount dc(login_server) AS UniqueServerCount by HostName, User | sort -UniqueServerCount | where UniqueServerCount &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What the above answers is: "Show me the events where a host and user name logs into two or more different login servers". What I need to add is that I only want to show events that log into two or more login servers within 1 second of each other.&lt;/P&gt;

&lt;P&gt;Bucket does not do this as two events can fall within 1 second of each other, but not fall into the same one second buckets markers.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 18:21:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-together-events-based-on-their-relative-distance-in/m-p/191411#M55113</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2014-06-06T18:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to group together events based on their relative distance in _time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-together-events-based-on-their-relative-distance-in/m-p/191412#M55114</link>
      <description>&lt;P&gt;Hi thisissplunk,&lt;/P&gt;

&lt;P&gt;Maybe you can use the "transaction" command. Using a "| transaction login_server maxspan=1s". This way you will group all the events with the login_server that are equal withing 1 second max difference between events.&lt;/P&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:48:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-together-events-based-on-their-relative-distance-in/m-p/191412#M55114</guid>
      <dc:creator>gfreitas</dc:creator>
      <dc:date>2020-09-28T16:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to group together events based on their relative distance in _time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-together-events-based-on-their-relative-distance-in/m-p/191413#M55115</link>
      <description>&lt;P&gt;The transaction command did it. Though I will say it adds a LOT of overhead and makes some of our searches impossible over more than a few minutes. It does however do the same as the above initial search AND ensures they all happened within 1 second of each other.&lt;/P&gt;

&lt;P&gt;I can now say "Someone logged into 3 different servers within one second, and here is your single alert showing you so".&lt;/P&gt;

&lt;P&gt;sourcetype=logins login_server="server_01" login_server="server_02" login_server="server_03"  | transaction fields="HostName" maxspan=1s | eval UniqueServers=mvcount(login_server) | where UniqueServers &amp;gt; 1&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-together-events-based-on-their-relative-distance-in/m-p/191413#M55115</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2020-09-28T16:51:32Z</dc:date>
    </item>
  </channel>
</rss>

