<?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 can I search for two same events with 2 minutes between them? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39528#M467</link>
    <description>&lt;P&gt;There are several ways, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search for event 4776 | transaction account maxpause=120s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will group together events for the same user as long as they are no more than two minutes apart. Any result with eventcount&amp;gt;1 is what you're looking for.&lt;/P&gt;

&lt;P&gt;Alternatively, you can roll your own pseudo-transactions like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search for event 4776 | streamstats current=f window=1 global=f last(_time) as last_time by user | where abs(last_time-_time)&amp;lt;=120
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should run much faster than the transaction, but yields a slightly different result - what's better in your case depends on your environment.&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2013 10:20:52 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-05-20T10:20:52Z</dc:date>
    <item>
      <title>How can I search for two same events with 2 minutes between them?</title>
      <link>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39527#M466</link>
      <description>&lt;P&gt;Hi, I need to search  2 failed and identical loggin attemps with 2 minutes between each other to know if someone is trying to guess the pass of a domain account.&lt;/P&gt;

&lt;P&gt;For example, I want to search for the Event 4776(failed loggin attempt) for the same account but only if is happening between for example 2 minutes.&lt;BR /&gt;
How can I search this?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 09:52:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39527#M466</guid>
      <dc:creator>Silverfeyn</dc:creator>
      <dc:date>2013-05-20T09:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I search for two same events with 2 minutes between them?</title>
      <link>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39528#M467</link>
      <description>&lt;P&gt;There are several ways, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search for event 4776 | transaction account maxpause=120s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will group together events for the same user as long as they are no more than two minutes apart. Any result with eventcount&amp;gt;1 is what you're looking for.&lt;/P&gt;

&lt;P&gt;Alternatively, you can roll your own pseudo-transactions like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search for event 4776 | streamstats current=f window=1 global=f last(_time) as last_time by user | where abs(last_time-_time)&amp;lt;=120
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should run much faster than the transaction, but yields a slightly different result - what's better in your case depends on your environment.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 10:20:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39528#M467</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-05-20T10:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I search for two same events with 2 minutes between them?</title>
      <link>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39529#M468</link>
      <description>&lt;P&gt;Assuming you have the fields "EventID" and "Account" (otherwise adjust accordingly):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... EventID=4776 | transaction Account maxspan=2m | search eventcount&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 May 2013 10:23:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39529#M468</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-05-20T10:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I search for two same events with 2 minutes between them?</title>
      <link>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39530#M469</link>
      <description>&lt;P&gt;Ok, I have been looking and the correct code is ;&lt;BR /&gt;
EventCode=4625&lt;BR /&gt;
The Account field doesn't exist, there is a subfield that tracks the username that I want to look for, this is a example of the log;&lt;BR /&gt;
&lt;IMG src="http://i41.tinypic.com/2vb0rqs.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;The yellow part would be the "Account" but I don't know how to track it, and if I use &lt;BR /&gt;
"EventCode=4625 | transaction ComputerName maxspan=2m | search eventcount&amp;gt;1" trying to track the ComputerName field, It shows all the events, not only events happened in the last 2 minutes.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 11:05:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39530#M469</guid>
      <dc:creator>Silverfeyn</dc:creator>
      <dc:date>2013-05-20T11:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I search for two same events with 2 minutes between them?</title>
      <link>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39531#M470</link>
      <description>&lt;P&gt;Ok, I have been looking and the correct code is ;&lt;BR /&gt;
EventCode=4625&lt;BR /&gt;
The Account field doesn't exist, there is a subfield that tracks the username that I want to look for, this is a example of the log;&lt;BR /&gt;
&lt;IMG src="http://i41.tinypic.com/2vb0rqs.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;The yellow part would be the "Account" but I don't know how to track it, and if I use &lt;BR /&gt;
"EventCode=4625 | transaction ComputerName maxspan=2m | search eventcount&amp;gt;1" trying to track the ComputerName field, It shows all the events, not only events happened in the last 2 minutes.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 11:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39531#M470</guid>
      <dc:creator>Silverfeyn</dc:creator>
      <dc:date>2013-05-20T11:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I search for two same events with 2 minutes between them?</title>
      <link>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39532#M471</link>
      <description>&lt;P&gt;You can extract that field in the search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "Nombre de cuenta:\s*(?&amp;lt;account&amp;gt;\w+)" | transaction ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To make the extraction stick you can put the regular expression into a field extraction through the manager.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 12:49:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-can-I-search-for-two-same-events-with-2-minutes-between-them/m-p/39532#M471</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-05-20T12:49:50Z</dc:date>
    </item>
  </channel>
</rss>

