<?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 Filtering Events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493299#M84293</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
I would want to know the current event and the after event of that particular current event.&lt;/P&gt;

&lt;P&gt;1.First i would want to search for a particular number sequence 12345.&lt;BR /&gt;
2.Then find the event that occurs right after it.&lt;BR /&gt;
3.I want the result to have both the events.&lt;BR /&gt;
4.index,source and sourcetype for both the events are same.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;In the below set of data,&lt;/P&gt;

&lt;P&gt;Srvcs.APIController - Start - [12345] &lt;BR /&gt;
Srvcs.evntcontroller - service not found&lt;BR /&gt;
Srvcs.APIController - attempting&lt;/P&gt;

&lt;P&gt;Srvcs.APIController - Start - [12345] &lt;BR /&gt;
Srvcs.errcontroller - invalid call&lt;BR /&gt;
Srvcs.APIController - attempting&lt;/P&gt;

&lt;P&gt;Result i want is &lt;/P&gt;

&lt;P&gt;Srvcs.APIController - Start - [12345] &lt;BR /&gt;
Srvcs.evntcontroller - service not found&lt;/P&gt;

&lt;P&gt;And for the second set&lt;/P&gt;

&lt;P&gt;Srvcs.APIController - Start - [12345] &lt;BR /&gt;
Srvcs.errcontroller - invalid call&lt;/P&gt;

&lt;P&gt;Kindly help me with this&lt;/P&gt;</description>
    <pubDate>Sat, 05 Oct 2019 19:56:43 GMT</pubDate>
    <dc:creator>Deepz2612</dc:creator>
    <dc:date>2019-10-05T19:56:43Z</dc:date>
    <item>
      <title>Filtering Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493299#M84293</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I would want to know the current event and the after event of that particular current event.&lt;/P&gt;

&lt;P&gt;1.First i would want to search for a particular number sequence 12345.&lt;BR /&gt;
2.Then find the event that occurs right after it.&lt;BR /&gt;
3.I want the result to have both the events.&lt;BR /&gt;
4.index,source and sourcetype for both the events are same.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;In the below set of data,&lt;/P&gt;

&lt;P&gt;Srvcs.APIController - Start - [12345] &lt;BR /&gt;
Srvcs.evntcontroller - service not found&lt;BR /&gt;
Srvcs.APIController - attempting&lt;/P&gt;

&lt;P&gt;Srvcs.APIController - Start - [12345] &lt;BR /&gt;
Srvcs.errcontroller - invalid call&lt;BR /&gt;
Srvcs.APIController - attempting&lt;/P&gt;

&lt;P&gt;Result i want is &lt;/P&gt;

&lt;P&gt;Srvcs.APIController - Start - [12345] &lt;BR /&gt;
Srvcs.evntcontroller - service not found&lt;/P&gt;

&lt;P&gt;And for the second set&lt;/P&gt;

&lt;P&gt;Srvcs.APIController - Start - [12345] &lt;BR /&gt;
Srvcs.errcontroller - invalid call&lt;/P&gt;

&lt;P&gt;Kindly help me with this&lt;/P&gt;</description>
      <pubDate>Sat, 05 Oct 2019 19:56:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493299#M84293</guid>
      <dc:creator>Deepz2612</dc:creator>
      <dc:date>2019-10-05T19:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493300#M84294</link>
      <description>&lt;P&gt;This sounds like a job for &lt;CODE&gt;transaction&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo source=bar sourcetype=baz | transaction startwith="12345" maxevents=2 | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Oct 2019 23:39:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493300#M84294</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-05T23:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493301#M84295</link>
      <description>&lt;P&gt;But that doesnt seem to work.&lt;BR /&gt;
I tried but it is showing some other event and not this&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2019 04:58:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493301#M84295</guid>
      <dc:creator>Deepz2612</dc:creator>
      <dc:date>2019-10-06T04:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493302#M84296</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
|  eval raw="Srvcs.APIController - Start - [12345]
Srvcs.evntcontroller - service not found
Srvcs.APIController - attempting
Srvcs.APIController - Start - [12345]
Srvcs.errcontroller - invalid call
Srvcs.APIController - attempting"
| makemv delim="
" raw
| mvexpand raw

| rename COMMENT AS "Everything above generates sample events; everything below is your solution"

| streamstats count AS _serial
| eval _time = _time + _serial
| rename raw AS _raw
| sort 0 - _time
| reverse
| streamstats count(eval(searchmatch("[12345]"))) AS sessionID
| dedup 2 sessionID
| stats min(_time) AS _time values(_raw) AS events BY sessionID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Oct 2019 18:30:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-Events/m-p/493302#M84296</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-06T18:30:16Z</dc:date>
    </item>
  </channel>
</rss>

