<?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 find all the events since the last instance of a specific event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-all-the-events-since-the-last-instance-of-a-specific/m-p/156001#M43889</link>
    <description>&lt;P&gt;I feel like this should be an easy question to find the answer to, but I've spent a good hour or so looking and haven't found it.  So, at the risk of looking stupid, here goes:&lt;/P&gt;

&lt;P&gt;I'd like to craft a search string to use in a dashboard that returns all the instances of a defined set of events (say, A, B and C) that have occurred since the last occurrence of a different event (say X).  I can write the two queries independently no problem:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_id="X" | head 1 | table _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;gives me the time of the last instance of X, and then I can just change the time range selector to set that to start at that point and run &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_id="A" OR event_id="B" or event_id="C" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to find the events I'm interested in.  But it really seems like this should be possible to do in a single query, passing the result of the first as a  parameter into the &lt;CODE&gt;where&lt;/CODE&gt; clause of the second.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Oct 2014 17:54:46 GMT</pubDate>
    <dc:creator>davemulligan</dc:creator>
    <dc:date>2014-10-08T17:54:46Z</dc:date>
    <item>
      <title>How to find all the events since the last instance of a specific event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-all-the-events-since-the-last-instance-of-a-specific/m-p/156001#M43889</link>
      <description>&lt;P&gt;I feel like this should be an easy question to find the answer to, but I've spent a good hour or so looking and haven't found it.  So, at the risk of looking stupid, here goes:&lt;/P&gt;

&lt;P&gt;I'd like to craft a search string to use in a dashboard that returns all the instances of a defined set of events (say, A, B and C) that have occurred since the last occurrence of a different event (say X).  I can write the two queries independently no problem:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_id="X" | head 1 | table _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;gives me the time of the last instance of X, and then I can just change the time range selector to set that to start at that point and run &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_id="A" OR event_id="B" or event_id="C" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to find the events I'm interested in.  But it really seems like this should be possible to do in a single query, passing the result of the first as a  parameter into the &lt;CODE&gt;where&lt;/CODE&gt; clause of the second.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2014 17:54:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-all-the-events-since-the-last-instance-of-a-specific/m-p/156001#M43889</guid>
      <dc:creator>davemulligan</dc:creator>
      <dc:date>2014-10-08T17:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to find all the events since the last instance of a specific event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-all-the-events-since-the-last-instance-of-a-specific/m-p/156002#M43890</link>
      <description>&lt;P&gt;A subsearch should work nicely here.  You can use this to pass KV pairs to the outer search, in your case _time as earliest.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_id="A" OR event_id="B" or event_id="C" latest=now [ search event_id="X" | head 1 | table _time | rename _time AS earliest ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So this passes the value of _time for the event found in the first search (named earliest) and then passes it to the outer search which should do what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2014 21:12:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-all-the-events-since-the-last-instance-of-a-specific/m-p/156002#M43890</guid>
      <dc:creator>emechler_splunk</dc:creator>
      <dc:date>2014-10-08T21:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to find all the events since the last instance of a specific event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-all-the-events-since-the-last-instance-of-a-specific/m-p/156003#M43891</link>
      <description>&lt;P&gt;Thank you.  I didn't fully understand that the sub search return key - value pairs.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2014 21:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-all-the-events-since-the-last-instance-of-a-specific/m-p/156003#M43891</guid>
      <dc:creator>davemulligan</dc:creator>
      <dc:date>2014-10-08T21:19:38Z</dc:date>
    </item>
  </channel>
</rss>

