<?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: correlating events within a given time window in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102581#M182990</link>
    <description>&lt;P&gt;Thanks James...the solution works perfectly&lt;BR /&gt;
only issue i see is that having multiple regular expression slows down the search. Since i already know the format of the event, the individual field, isn't there a way to avoid regex. For example a way to specify that whenever the parameter="memoryusage" memoryuse=value&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2013 07:57:44 GMT</pubDate>
    <dc:creator>sushil909</dc:creator>
    <dc:date>2013-07-23T07:57:44Z</dc:date>
    <item>
      <title>correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102573#M182982</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have a file containing events in the format given below&lt;BR /&gt;
Time system parameter value&lt;/P&gt;

&lt;P&gt;12jun2013:14:00:00 system1 memoryusage 12345221233&lt;BR /&gt;
12jun2013:14:00:00 system1 userprocesses 129&lt;/P&gt;

&lt;P&gt;I have created my own custom source type. I am able to make splunk parse the data according to the fields.&lt;BR /&gt;
I want to be able to run queries like &lt;BR /&gt;
whenever memoryusage &amp;gt; 10000000 show the userprocesses within that time window(1sec)&lt;/P&gt;

&lt;P&gt;How can i run this kind of query ?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2013 11:12:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102573#M182982</guid>
      <dc:creator>sushil909</dc:creator>
      <dc:date>2013-07-22T11:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102574#M182983</link>
      <description>&lt;P&gt;Extract the data into a field named Mem_count. You can use rex / UI field extraction. Thanks.&lt;/P&gt;

&lt;P&gt;Sourcetype=_Name "memoryusage"| where Mem_count&amp;gt;10000000&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102574#M182983</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T14:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102575#M182984</link>
      <description>&lt;P&gt;this would only display the 'memoryusage' events.Based on this condition i want to display the userprocesses events that may have occured some time prior (eg with 5 secs) to the memoryusage event&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2013 12:23:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102575#M182984</guid>
      <dc:creator>sushil909</dc:creator>
      <dc:date>2013-07-22T12:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102576#M182985</link>
      <description>&lt;P&gt;sourcetype=_Name "userprocesses"|eval a=strptime(_time,"%d:%m:%y %H:%M:%S")|fields a [|search index=main sourcetype=_Name "memoryusage"|where MCount &amp;gt;10000000|eval a=strptime(_time,"%d:%m:%y %H:%M:%S")|fields a]&lt;/P&gt;

&lt;P&gt;the above query will give you the event containing the Process at the same time when the memory usage is high. You can also remove the %s parameter if you are okay with comparing minute wise.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:24:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102576#M182985</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T14:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102577#M182986</link>
      <description>&lt;P&gt;Try something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=whatever (memoryusage OR userprocesses) | rex field=_raw ".*memoryusage (?P&amp;lt; memoryusage&amp;gt;[0-9]+)" | rex field=_raw ".*userprocess (?P&amp;lt; userprocess&amp;gt;[0-9]+)"  | transaction _time maxspan=1s | search memoryusage&amp;gt;10000000 |  table memoryusage userprocess
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;formatting is a bit messed up so the &amp;lt; word&amp;gt; should really be &amp;lt;word&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2013 15:16:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102577#M182986</guid>
      <dc:creator>jameshgibson</dc:creator>
      <dc:date>2013-07-22T15:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102578#M182987</link>
      <description>&lt;P&gt;Hey James, &lt;BR /&gt;
Great analysis, but without join how the Table will show different value belonging to separate events? I faced the same in my query to get the userprocess value..&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2013 15:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102578#M182987</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-07-22T15:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102579#M182988</link>
      <description>&lt;P&gt;the transaction command joins all the events for a particular second in a single event. So you should have 1 memoryusage and several userprocess per event, so no need to use joins/stats/etc. Give it a go anyway &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2013 15:55:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102579#M182988</guid>
      <dc:creator>jameshgibson</dc:creator>
      <dc:date>2013-07-22T15:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102580#M182989</link>
      <description>&lt;P&gt;I tried it on sample event, i didn't get it. Let the actual person give it a go &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2013 16:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102580#M182989</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-07-22T16:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102581#M182990</link>
      <description>&lt;P&gt;Thanks James...the solution works perfectly&lt;BR /&gt;
only issue i see is that having multiple regular expression slows down the search. Since i already know the format of the event, the individual field, isn't there a way to avoid regex. For example a way to specify that whenever the parameter="memoryusage" memoryuse=value&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2013 07:57:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102581#M182990</guid>
      <dc:creator>sushil909</dc:creator>
      <dc:date>2013-07-23T07:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102582#M182991</link>
      <description>&lt;P&gt;if the log file contained paramater=value then Splunk should parse out the fields automagically for you yes. If you can't change the log format then it may be worth setting up some field extractions.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2013 08:17:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102582#M182991</guid>
      <dc:creator>jameshgibson</dc:creator>
      <dc:date>2013-07-23T08:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: correlating events within a given time window</title>
      <link>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102583#M182992</link>
      <description>&lt;P&gt;Removing regex from James answer since I had field extractions in place:&lt;BR /&gt;
sourcetype=whatever (memoryusage OR userprocesses) | eval memoryusage=case(parameter=="memoryusage",value)|eval userprocess=case(parameter=="userprocess",value)|transaction _time maxspan=1s | search memoryusage&amp;gt;10000000 | table memoryusage userprocess&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2013 11:08:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/correlating-events-within-a-given-time-window/m-p/102583#M182992</guid>
      <dc:creator>sushil909</dc:creator>
      <dc:date>2013-07-23T11:08:29Z</dc:date>
    </item>
  </channel>
</rss>

