<?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 Merging Associated Events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100644#M21077</link>
    <description>&lt;P&gt;I have a script which sends individual events into Splunk, each event is essentially a report on a HTTP Request, either GET or POST. The event contains a number of fields but two key ones are StepName and Timing:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;StepName will be a title for the HTTPRequest etc. PostLogin&lt;/LI&gt;
&lt;LI&gt;Timing will be a int value of the milliseconds taken by HttpRequest&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I'm writing a report which shows the average time taken for each step over last 15 minutes. However, from an end users point of view, some steps are part of one process e.g.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Step1 - GetLoginPage&lt;/LI&gt;
&lt;LI&gt;Step2 - PostLoginPage&lt;/LI&gt;
&lt;LI&gt;Step3 - ProcessUserDetails&lt;/LI&gt;
&lt;LI&gt;Step4 - GetHomePage&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;In this case Step2 and Step3 would be one process for an end user, therefore I'd like to be able to report on these as if they were one step so the following:&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;GetLoginPage 50&lt;BR /&gt;&lt;BR /&gt;
PostLoginPage 100&lt;BR /&gt;&lt;BR /&gt;
ProcessUserDetails 250&lt;BR /&gt;&lt;BR /&gt;
GetHomePage 80&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;would become&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;GetLoginPage 50&lt;BR /&gt;&lt;BR /&gt;
PostLoginPage 350&lt;BR /&gt;&lt;BR /&gt;
GetHomePage 80&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;I can use a replace on the StepName so I have &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;GetLoginPage 50&lt;BR /&gt;&lt;BR /&gt;
PostLoginPage 100&lt;BR /&gt;&lt;BR /&gt;
PostLoginPage 250&lt;BR /&gt;&lt;BR /&gt;
GetHomePage 80&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;How can I then merge these results so it summates the two PostLoginPage steps and then gives me an average over the time period for the three individual steps? &lt;/P&gt;

&lt;P&gt;Note each step has a field called TransactionGUID which associates a group of steps for the same execution.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Oct 2012 09:21:31 GMT</pubDate>
    <dc:creator>paddy3883</dc:creator>
    <dc:date>2012-10-24T09:21:31Z</dc:date>
    <item>
      <title>Merging Associated Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100644#M21077</link>
      <description>&lt;P&gt;I have a script which sends individual events into Splunk, each event is essentially a report on a HTTP Request, either GET or POST. The event contains a number of fields but two key ones are StepName and Timing:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;StepName will be a title for the HTTPRequest etc. PostLogin&lt;/LI&gt;
&lt;LI&gt;Timing will be a int value of the milliseconds taken by HttpRequest&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I'm writing a report which shows the average time taken for each step over last 15 minutes. However, from an end users point of view, some steps are part of one process e.g.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Step1 - GetLoginPage&lt;/LI&gt;
&lt;LI&gt;Step2 - PostLoginPage&lt;/LI&gt;
&lt;LI&gt;Step3 - ProcessUserDetails&lt;/LI&gt;
&lt;LI&gt;Step4 - GetHomePage&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;In this case Step2 and Step3 would be one process for an end user, therefore I'd like to be able to report on these as if they were one step so the following:&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;GetLoginPage 50&lt;BR /&gt;&lt;BR /&gt;
PostLoginPage 100&lt;BR /&gt;&lt;BR /&gt;
ProcessUserDetails 250&lt;BR /&gt;&lt;BR /&gt;
GetHomePage 80&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;would become&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;GetLoginPage 50&lt;BR /&gt;&lt;BR /&gt;
PostLoginPage 350&lt;BR /&gt;&lt;BR /&gt;
GetHomePage 80&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;I can use a replace on the StepName so I have &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;GetLoginPage 50&lt;BR /&gt;&lt;BR /&gt;
PostLoginPage 100&lt;BR /&gt;&lt;BR /&gt;
PostLoginPage 250&lt;BR /&gt;&lt;BR /&gt;
GetHomePage 80&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;How can I then merge these results so it summates the two PostLoginPage steps and then gives me an average over the time period for the three individual steps? &lt;/P&gt;

&lt;P&gt;Note each step has a field called TransactionGUID which associates a group of steps for the same execution.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 09:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100644#M21077</guid>
      <dc:creator>paddy3883</dc:creator>
      <dc:date>2012-10-24T09:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Associated Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100645#M21078</link>
      <description>&lt;P&gt;I would suggest searching the documentation for eval(case). I had a similar issue and this was a suitable workaround. If you need any more help, let me know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 10:32:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100645#M21078</guid>
      <dc:creator>watsm10</dc:creator>
      <dc:date>2012-10-24T10:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Associated Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100646#M21079</link>
      <description>&lt;P&gt;so.. eval StepName = case(HTTPRequest="GetLoginPage","GetLoginPage",(HTTPRequest="PostLoginPage" and HTTPRequest="ProcessUserDetails"),"PostLoginPage",HTTPRequest="GetHomePage","GetHomePage") &lt;/P&gt;

&lt;P&gt;so it's case(name of fields you wish to rename/combine,"new name",name of fields you wish to rename/combine,"new name".......)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 10:38:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100646#M21079</guid>
      <dc:creator>watsm10</dc:creator>
      <dc:date>2012-10-24T10:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Associated Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100647#M21080</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search | replace "ProcessUserDetails" with "PostLoginPage" in StepName | chart sum(exec_time) over TransactionGUID by StepName | stats avg(GetLoginPage) avg(PostLoginPage) avg(GetHomePage)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is one way to do it. &lt;CODE&gt;exec_time&lt;/CODE&gt; would be the field where the execution time is stored.&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 11:59:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100647#M21080</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-10-24T11:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Associated Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100648#M21081</link>
      <description>&lt;P&gt;Thanks, I have found a way to do it not too disimilar to this so thanks for feedback.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 12:13:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100648#M21081</guid>
      <dc:creator>paddy3883</dc:creator>
      <dc:date>2012-10-24T12:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Associated Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100649#M21082</link>
      <description>&lt;P&gt;Thanks, I was able to use the eval for this purpose and work into a solution&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 12:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Merging-Associated-Events/m-p/100649#M21082</guid>
      <dc:creator>paddy3883</dc:creator>
      <dc:date>2012-10-24T12:13:53Z</dc:date>
    </item>
  </channel>
</rss>

