<?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: x followed by y in z time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19361#M2936</link>
    <description>&lt;P&gt;Or even better yet, 10 failures followed by a success.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Dec 2010 01:04:05 GMT</pubDate>
    <dc:creator>tawollen</dc:creator>
    <dc:date>2010-12-31T01:04:05Z</dc:date>
    <item>
      <title>x followed by y in z time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19358#M2933</link>
      <description>&lt;P&gt;I tried looking for something like this in answers and splunk docs and may not be using the right keywords. &lt;/P&gt;

&lt;P&gt;Is there a way that I can do a search to find something like a failed login followed by a successful login within 10 minutes by a single user?&lt;/P&gt;

&lt;P&gt;I was thinking about buckets, but I don't think that will work since I want to look 10 minutes after a specific event (login failure). &lt;/P&gt;

&lt;P&gt;Conversely, I assume if I can find a way to do that, then I can find a way to also search for something like x not preceded by y (e.g. someone tries to log into one server without doing a virus scan 1st)&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2010 11:14:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19358#M2933</guid>
      <dc:creator>tawollen</dc:creator>
      <dc:date>2010-12-30T11:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: x followed by y in z time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19359#M2934</link>
      <description>&lt;P&gt;Sounds like you need the &lt;CODE&gt;transaction&lt;/CODE&gt; command.&lt;/P&gt;

&lt;P&gt;Here are several links from the docs to get you started:
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;A href="http://www.splunk.com/base/Documentation/4.1.6/Knowledge/Searchfortransactions" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1.6/Knowledge/Searchfortransactions&lt;/A&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;A href="http://www.splunk.com/base/Documentation/4.1.6/Knowledge/Abouttransactions" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1.6/Knowledge/Abouttransactions&lt;/A&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;A href="http://www.splunk.com/base/Documentation/4.1.6/AppManagement/Buildatransaction" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1.6/AppManagement/Buildatransaction&lt;/A&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;A href="http://www.splunk.com/base/Documentation/4.1.6/SearchReference/Transaction" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1.6/SearchReference/Transaction&lt;/A&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;For example, for your first example, one approach might be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Login
| transaction startswith=("Failure") maxspan=10m host,user
| search Success Failure
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Dec 2010 12:05:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19359#M2934</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-12-30T12:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: x followed by y in z time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19360#M2935</link>
      <description>&lt;P&gt;What about if I want to make sure that Success comes before Failure? (bad example for login), but there is something else I am looking at where the order matters&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2010 01:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19360#M2935</guid>
      <dc:creator>tawollen</dc:creator>
      <dc:date>2010-12-31T01:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: x followed by y in z time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19361#M2936</link>
      <description>&lt;P&gt;Or even better yet, 10 failures followed by a success.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2010 01:04:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19361#M2936</guid>
      <dc:creator>tawollen</dc:creator>
      <dc:date>2010-12-31T01:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: x followed by y in z time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19362#M2937</link>
      <description>&lt;P&gt;You can add endswith=("Success") or similar in the 'transaction' command to force the end of a transaction as soon as it sees a success. The command also adds a new field called linecount to each combined result, so at that point you can search for linecount&amp;gt;10.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2010 02:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/x-followed-by-y-in-z-time/m-p/19362#M2937</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-12-31T02:30:37Z</dc:date>
    </item>
  </channel>
</rss>

