<?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: Can Splunk filter/match events and bring back neighbouring events like GNU grep? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13672#M1317</link>
    <description>&lt;P&gt;Glenn,
I think Simeon was right trying to use map and localize. I tried to do this as well, but as you found out once a search (saved or otherwise) is passed to map it doesn't spit out any results. This might actually be a defect in the product, I'll log a case about it.&lt;/P&gt;

&lt;P&gt;Here is however how you can work around it. It's not as pretty as map, but it works. First the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* [search index=foo sourcetype="WindowsUpdateLog" Synchronizing | eval search="index=\"" + index + "\" host=\"" + host + "\" sourcetype=\"" + sourcetype + "\"" | eval earliest=min(_time-30) | eval latest=max(_time+30) | fields + search earliest latest | format "" "(" "" ") OR" "" "_cd=0"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;easier to read:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* [search index=foo sourcetype="WindowsUpdateLog" Synchronizing 
| eval search="index=\"" + index + "\" host=\"" + host + "\" sourcetype=\"" + sourcetype + "\"" 
| eval earliest=min(_time-30) 
| eval latest=max(_time+30) 
| fields + search earliest latest 
| format "" "(" "" ") OR" "" "_cd=0"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search will return all events within 30 seconds of the events you are searching for.&lt;/P&gt;

&lt;P&gt;I am modifying the format command to spit out search ranges that we are passing to the outer wildcard search. If I don't try to modify the output of the format command I get the same Missing LHS for AND search error you were receiving, and if I just strip the outer parenthesis a trailing OR is added. I couldn't find a different way around the trailing OR so I decided to just give it a bogus event index id value (_cd=0). If there is a better way around it I'd appreciate if someone could leave me a comment.&lt;/P&gt;

&lt;P&gt;Here is some sample output of the subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( earliest="1278605705.287" latest="1278605765.287" index="foo"  host="host1"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278605704.974" latest="1278605764.974" index="foo"  host="host1"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278605173.017" latest="1278605233.017" index="foo"  host="host2"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278605171.423" latest="1278605231.423" index="foo"  host="host2"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278602104.633" latest="1278602164.633" index="foo"  host="host1"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278602104.242" latest="1278602164.242" index="foo"  host="host1"  sourcetype="WindowsUpdateLog" ) OR _cd=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I hope this will work for you.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jul 2010 23:19:10 GMT</pubDate>
    <dc:creator>ftk</dc:creator>
    <dc:date>2010-07-08T23:19:10Z</dc:date>
    <item>
      <title>Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13665#M1310</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We would like to be able to search a log file for a certain pattern or string, and then be able to return neighbouring events (say, 5 lines before or after the matched event. however we specify). This would be useful in a case where we want to see if a particular event is caused by, or causes any other events.&lt;/P&gt;

&lt;P&gt;This functionality would be similar to using the -A (--after-context) and -B (--before-context) options of GNU grep.&lt;/P&gt;

&lt;P&gt;Is this possible in Splunk?&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;Glenn&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2010 21:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13665#M1310</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2010-05-17T21:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13666#M1311</link>
      <description>&lt;P&gt;There is a doc on how to do this in our 3.x version.  You can use the exact same technique in 4.x, but a search command like localize might be better suited:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | localize maxpause=5m | map search="search failure starttimeu=$starttime$ endtimeu=$endtime$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Localize" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Localize&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Here is a sample command from the wiki doc:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[search sourcetype="splunksource" splunk_event | stats min(_time) as eventstarttime | eval starttimeu=eventstarttime-900 | eval endtimeu=eventstarttime+900 | fields + starttimeu endtimeu]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/wiki/Community:FindingSurroundingEvents" rel="nofollow"&gt;http://www.splunk.com/wiki/Community:FindingSurroundingEvents&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2010 00:18:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13666#M1311</guid>
      <dc:creator>Simeon</dc:creator>
      <dc:date>2010-05-18T00:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13667#M1312</link>
      <description>&lt;P&gt;Either I'm doing it wrong or this doesn't give me what I want.&lt;/P&gt;

&lt;P&gt;host=splunkhost source=splunksource "search_text" | localize maxpause=5m | map search="search starttimeu=$starttime$ endtimeu=$endtime$"&lt;/P&gt;

&lt;P&gt;Gives:&lt;BR /&gt;
time  count  density  duration  endtime  starttime&lt;BR /&gt;&lt;BR /&gt;
1 18/05/2010 09:25:06.000 1 -1.000000 0 1274171136 1274171076 &lt;/P&gt;

&lt;P&gt;IE. not other events near the searched one&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;[search host="bruatosd001*" source=/var/log/messages spam | eval starttimeu=_time | eval endtimeu=_time+300 | fields + starttimeu endtimeu]&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;just gives: Error in 'UnifiedSearch': Unable to parse the 'Missing LHS for AND' search.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:12:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13667#M1312</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2020-09-28T09:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13668#M1313</link>
      <description>&lt;P&gt;I should say that I'm using v4.1.2. Also, sorry that the above has completely lost its formatting. The "time count density..." bit is actually supposed to be a table, as returned by the search passed to localize. This came up in the "Results table" view section, there were no actual event results in the "Events list" view section.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2010 17:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13668#M1313</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2010-05-18T17:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13669#M1314</link>
      <description>&lt;P&gt;Glenn, I'm in the same boat as you and am honestly extremely surprised at how hard this task is. When I started looking this morning, I thought for certain I'd find a command or modifier to let a search return context around a found message.&lt;/P&gt;

&lt;P&gt;localize + map seems completely useless. Sure, it tells you other events happened nearby but there's no way to actually see the events. I'm not sure how anyone can claim that this is an alternative to using a subsearch to see surrounding events (unless there's some trick we're missing, in which case it should be documented).&lt;/P&gt;

&lt;P&gt;As for subsearches, I think this might be a bug. We're using a trial (4.0.9) and I get the exact same behavior as you're describing with the "Missing LHS for AND" error. However, I only get that if I try to have the fields command spit out the start and end times (tried using 'earliest' and 'latest' to no avail as well).&lt;/P&gt;

&lt;P&gt;I'm experimenting and maybe I can trick it. It's on my list for the next time I talk to our rep as well, because focused queries that show the context are extremely important.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2010 03:00:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13669#M1314</guid>
      <dc:creator>cjbehm</dc:creator>
      <dc:date>2010-06-26T03:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13670#M1315</link>
      <description>&lt;P&gt;I too would like to be able to search the logs with the results either showing the context (surrounding events) or without actually filtering out anything. This doesn't seem possible at first glance though. Anyone have any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2010 00:47:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13670#M1315</guid>
      <dc:creator>seren</dc:creator>
      <dc:date>2010-07-05T00:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13671#M1316</link>
      <description>&lt;P&gt;This is still unanswered (not sure why the below answer has at least two upvotes - its wrong), so I'm going to start a bounty. I often have developers asking me for this, plus there are others in this thread that are interested... there must be a way? If it's not answered after this, I'll be raising an enhancement request.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2010 16:53:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13671#M1316</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2010-07-08T16:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13672#M1317</link>
      <description>&lt;P&gt;Glenn,
I think Simeon was right trying to use map and localize. I tried to do this as well, but as you found out once a search (saved or otherwise) is passed to map it doesn't spit out any results. This might actually be a defect in the product, I'll log a case about it.&lt;/P&gt;

&lt;P&gt;Here is however how you can work around it. It's not as pretty as map, but it works. First the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* [search index=foo sourcetype="WindowsUpdateLog" Synchronizing | eval search="index=\"" + index + "\" host=\"" + host + "\" sourcetype=\"" + sourcetype + "\"" | eval earliest=min(_time-30) | eval latest=max(_time+30) | fields + search earliest latest | format "" "(" "" ") OR" "" "_cd=0"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;easier to read:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* [search index=foo sourcetype="WindowsUpdateLog" Synchronizing 
| eval search="index=\"" + index + "\" host=\"" + host + "\" sourcetype=\"" + sourcetype + "\"" 
| eval earliest=min(_time-30) 
| eval latest=max(_time+30) 
| fields + search earliest latest 
| format "" "(" "" ") OR" "" "_cd=0"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search will return all events within 30 seconds of the events you are searching for.&lt;/P&gt;

&lt;P&gt;I am modifying the format command to spit out search ranges that we are passing to the outer wildcard search. If I don't try to modify the output of the format command I get the same Missing LHS for AND search error you were receiving, and if I just strip the outer parenthesis a trailing OR is added. I couldn't find a different way around the trailing OR so I decided to just give it a bogus event index id value (_cd=0). If there is a better way around it I'd appreciate if someone could leave me a comment.&lt;/P&gt;

&lt;P&gt;Here is some sample output of the subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( earliest="1278605705.287" latest="1278605765.287" index="foo"  host="host1"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278605704.974" latest="1278605764.974" index="foo"  host="host1"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278605173.017" latest="1278605233.017" index="foo"  host="host2"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278605171.423" latest="1278605231.423" index="foo"  host="host2"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278602104.633" latest="1278602164.633" index="foo"  host="host1"  sourcetype="WindowsUpdateLog" ) OR ( earliest="1278602104.242" latest="1278602164.242" index="foo"  host="host1"  sourcetype="WindowsUpdateLog" ) OR _cd=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I hope this will work for you.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2010 23:19:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13672#M1317</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-07-08T23:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13673#M1318</link>
      <description>&lt;P&gt;you should be able to -A or -B (but not both) using the transaction command &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;equivalent of -B
.... | transaction endswith=(&amp;lt;search that matches the event of interest&amp;gt;) maxevents=&amp;lt;number of events in txn&amp;gt;

equivalent of -A
.... | transaction startswith=(&amp;lt;search that matches the event of interest&amp;gt;) maxevents=&amp;lt;number of events in txn&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jul 2010 01:24:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13673#M1318</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2010-07-09T01:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13674#M1319</link>
      <description>&lt;P&gt;This is a nice simple option, and does seem to partially work. Oddly, it only acts as expected when using the "endswith" transaction option. Then I get a single block of events, from just before my searched term (just what I want). However, when I replace "endswith" with "startswith" I get thousands of transaction events, that do not have the search term in them. Does this happen for you? My search for example (in case I have the syntax wrong):&lt;/P&gt;

&lt;P&gt;sourcetype=LSWebMessaging | transaction startswith=("epic=DIAAAAACAA5J5AG") maxevents=10&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2010 19:16:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13674#M1319</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2010-07-13T19:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13675#M1320</link>
      <description>&lt;P&gt;Thanks. This also works, but I must say, its particularly complicated, and would scare my users off Splunk! It's a little less flexible than Ledion Bitincka's transaction solution, as transaction can handle returning +/- a number of events as well as +/- time, but has the benefit of automatically restricting the search to a single log file (you dont have to know where the event is beforehand), and returning events as separate events - not one large transaction block. It will be difficult to decide who to award the bounty to.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2010 19:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13675#M1320</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2010-07-13T19:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13676#M1321</link>
      <description>&lt;P&gt;@Glenn, you could also add this as a custom workflow action and have a user kick this off with a click of a button. They would not need to remember the complicated syntax at that point.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2010 20:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13676#M1321</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-07-13T20:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13677#M1322</link>
      <description>&lt;P&gt;it seems like you've hit a bug !!! The current workaround would be to use another search after the transaction command to filter out "bad" transactions. So:&lt;BR /&gt;
sourcetype=LSWebMessaging | transaction startswith=("epic=DIAAAAACAA5J5AG") maxevents=10 | search "epic=DIAAAAACAA5J5AG"&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2010 02:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13677#M1322</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2010-07-22T02:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13678#M1323</link>
      <description>&lt;P&gt;if your use case is to look for events around the time of a given event, this other Answer might be useful: &lt;A href="http://answers.splunk.com/answers/9940/search-for-events-that-happened-around-the-time-of-other-events-that-also-meet-other-criteria"&gt;http://answers.splunk.com/answers/9940/search-for-events-that-happened-around-the-time-of-other-events-that-also-meet-other-criteria&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2014 18:54:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13678#M1323</guid>
      <dc:creator>piebob</dc:creator>
      <dc:date>2014-07-17T18:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13679#M1324</link>
      <description>&lt;P&gt;This isn't exactly what you're asking for, but there is a UI workflow to narrow down the time window around a specific event to see what happened immediately before and after that event in 6.x&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Click on the arrow next to the event you want to investigate in "List" view. &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Scroll down to the time section of the fields listed underneath the event and click on the _time&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;You'll get a pop-up with some options to look at events before, after, or near this time. Choose what makes sense.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Search will re-run with your time range in the time picker. If the events you want to investigate are in a separate index or require more keywords/filter terms, you can change that and Splunk will continue looking within that time window until you change the time range in the time picker. &lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;If you want to continue zooming out after this, you can use the zoom out controls on the green timeline. &lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2014 19:09:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13679#M1324</guid>
      <dc:creator>dlamas_splunk</dc:creator>
      <dc:date>2014-07-17T19:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13680#M1325</link>
      <description>&lt;P&gt;Hi ftk, I just stumbled upon this post and like your response.  I saw where you were looking for how to get rid of the trailing OR, so thought I would respond a few years later :-), below is the way to do it.&lt;/P&gt;

&lt;P&gt;| format "" "(" "" ")" "OR" ""&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2014 23:01:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13680#M1325</guid>
      <dc:creator>icyfeverr</dc:creator>
      <dc:date>2014-09-23T23:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13681#M1326</link>
      <description>&lt;P&gt;Hi - I tried the below but it's not working&lt;BR /&gt;
OutOfMemoryError host=ojwerelto* | transaction startswith="OutOfMemoryError" maxevents=100 &lt;/P&gt;

&lt;P&gt;When I just search for OutOfMemoryError host=ojwerelto* I get five events, now for each event I want to display 100 lines after/before that event...&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2015 14:52:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13681#M1326</guid>
      <dc:creator>deepeshk79</dc:creator>
      <dc:date>2015-04-02T14:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13682#M1327</link>
      <description>&lt;P&gt;Event immediately before:&lt;BR /&gt;
... | eval foo=if(searchmatch("something"),"true","false") | transaction startswith="foo=false" endswith="foo=true"&lt;/P&gt;

&lt;P&gt;Event immediately after:&lt;BR /&gt;
... | eval foo=if(searchmatch("something"),"true","false") | transaction startswith="foo=true" endswith="foo=false"&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2015 05:33:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13682#M1327</guid>
      <dc:creator>doksu</dc:creator>
      <dc:date>2015-07-15T05:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk filter/match events and bring back neighbouring events like GNU grep?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13683#M1328</link>
      <description>&lt;P&gt;This is also very slow! I had to use sampling to get some results.&lt;BR /&gt;
1. Can someone explain why its slow?&lt;BR /&gt;
2. Any other suggestions to speed it up?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 16:33:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-filter-match-events-and-bring-back-neighbouring/m-p/13683#M1328</guid>
      <dc:creator>hrdwdmrbl</dc:creator>
      <dc:date>2018-06-05T16:33:41Z</dc:date>
    </item>
  </channel>
</rss>

