<?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: chaining events together in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130229#M35475</link>
    <description>&lt;P&gt;That's what the problem statement is, correct? "where the modification generates a new_id and puts the original id in old_id"&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:45:47 GMT</pubDate>
    <dc:creator>_d_</dc:creator>
    <dc:date>2020-09-28T15:45:47Z</dc:date>
    <item>
      <title>chaining events together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130226#M35472</link>
      <description>&lt;P&gt;I am trying to figure out the query that would allow me to chain a series of events together. The issue here is that its an order system where the modification generates a new_id and puts the original id in old_id. old_id will be populated only the first modification message. &lt;/P&gt;

&lt;P&gt;This can go on multiple times.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;T1 new_id=1, old_id=, ...
T2 new_id=1, old_id=, ...
T3 new_id=2, old_id=1, ...
T4 new_id=2, old_id, ...
T5 new_id=3, old_id=2, ...
T6 new_id=3, old_id=,...
T7 new_id=3, old_id=,...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Modifications happen at T3,T5. Since all these events are technically part of a single conversation, is there a straight forward way to join a possible ENDLESS chain of these together? Any help would help. &lt;/P&gt;

&lt;P&gt;I dont believe transaction addresses this particular case. &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:45:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130226#M35472</guid>
      <dc:creator>gregbujak</dc:creator>
      <dc:date>2020-09-28T15:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: chaining events together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130227#M35473</link>
      <description>&lt;P&gt;If old_id exists on the start event, this should do it:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| transaction new_id startswith=(old_id=*)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;EDIT: the above, single transaction will isolate only changes. To "chain" those changes together try something like this: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;..| eval my_id=if(isnotnull(old_id), "bar" , '')  | transaction new_id startswith=(old_id=*) | transaction my_id&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 22:13:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130227#M35473</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2014-01-29T22:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: chaining events together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130228#M35474</link>
      <description>&lt;P&gt;Wouldn't this open a new transaction every time the new_id is changed?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 23:28:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130228#M35474</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-01-29T23:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: chaining events together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130229#M35475</link>
      <description>&lt;P&gt;That's what the problem statement is, correct? "where the modification generates a new_id and puts the original id in old_id"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:45:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130229#M35475</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2020-09-28T15:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: chaining events together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130230#M35476</link>
      <description>&lt;P&gt;The way I understand it, the example in the question is one conversation/transaction. When a new new_id is generated, it's supposed to be chained to the old new_id through the now filled old_id field.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 23:35:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130230#M35476</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-01-29T23:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: chaining events together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130231#M35477</link>
      <description>&lt;P&gt;All the events in this example are from a single conversation/transaction. &lt;/P&gt;

&lt;P&gt;I dont think this accounts for the iterative nature of this type of conversation and the initial messages with null old_id&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 15:15:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130231#M35477</guid>
      <dc:creator>gregbujak</dc:creator>
      <dc:date>2014-01-30T15:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: chaining events together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130232#M35478</link>
      <description>&lt;P&gt;Ah okay...try the edit above.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 15:30:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130232#M35478</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2014-01-30T15:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: chaining events together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130233#M35479</link>
      <description>&lt;P&gt;Hey ! &lt;/P&gt;

&lt;P&gt;I don't know exactly what you are expecting as output...but I think this should do the job : &lt;/P&gt;

&lt;P&gt;index=index sourcetype=sourcetype&lt;BR /&gt;
| eventstats values(old_id) AS A by new_id&lt;BR /&gt;
| rename new_id AS B&lt;BR /&gt;
| eval C=A+","+B&lt;BR /&gt;
| eval new_id=if(isnull(C),B,C) &lt;BR /&gt;
| makemv delim="," new_id&lt;BR /&gt;
| transaction new_id&lt;/P&gt;

&lt;P&gt;3no. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:26:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/chaining-events-together/m-p/130233#M35479</guid>
      <dc:creator>3no</dc:creator>
      <dc:date>2020-09-29T13:26:00Z</dc:date>
    </item>
  </channel>
</rss>

