<?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 How to correlate the results of two searches? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-the-results-of-two-searches/m-p/591496#M205915</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;We have two reverse proxies, one front, one back. They both log http requests and responses to the same index. Each request has a unique-ID that is the same on the front and back. I would like to correlate the front and back requests with the same unique-ID. So the two searches are something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;index=rpx proxy=front unique_id=*
index=rpx proxy=back unique_id=*&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log lines would then look something like this (shortened for brevity):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;proxy=front, unique_id=123456, time_taken=2ms
proxy=back, unique_id=123456, time_taken=5ms&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My goal is to have the delta time of the time_taken field and then display it in for instance a timechart avg. Maybe I should do the one search and correlate from the time_taken field from there?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 17:04:56 GMT</pubDate>
    <dc:creator>sebasti1aan</dc:creator>
    <dc:date>2022-03-30T17:04:56Z</dc:date>
    <item>
      <title>How to correlate the results of two searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-the-results-of-two-searches/m-p/591496#M205915</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;We have two reverse proxies, one front, one back. They both log http requests and responses to the same index. Each request has a unique-ID that is the same on the front and back. I would like to correlate the front and back requests with the same unique-ID. So the two searches are something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;index=rpx proxy=front unique_id=*
index=rpx proxy=back unique_id=*&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log lines would then look something like this (shortened for brevity):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;proxy=front, unique_id=123456, time_taken=2ms
proxy=back, unique_id=123456, time_taken=5ms&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My goal is to have the delta time of the time_taken field and then display it in for instance a timechart avg. Maybe I should do the one search and correlate from the time_taken field from there?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 17:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-the-results-of-two-searches/m-p/591496#M205915</guid>
      <dc:creator>sebasti1aan</dc:creator>
      <dc:date>2022-03-30T17:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate the results of two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-the-results-of-two-searches/m-p/591520#M205920</link>
      <description>&lt;P&gt;without a dataset it's little bit complicated but you have to use this logic&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=rpx unique_id=* proxy=front OR proxy=back
| eval time_taken_back=if(proxy="back",time_taken,""), time_taken_front=if(proxy="front",time_taken,""),unique_id_back=if(proxy="back",unique_id,""), unique_id_front=if(proxy="front",unique_id,"")
| eval delta=if(unique_id_back=unique_id_front,time_taken_back-time_taken_front,"")
| stats values(delta) as delta by unique_id,_time&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 30 Mar 2022 14:15:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-the-results-of-two-searches/m-p/591520#M205920</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2022-03-30T14:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate the results of two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-the-results-of-two-searches/m-p/591564#M205933</link>
      <description>&lt;P&gt;Thanks I will try it out and report back &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:11:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-the-results-of-two-searches/m-p/591564#M205933</guid>
      <dc:creator>sebasti1aan</dc:creator>
      <dc:date>2022-03-30T16:11:20Z</dc:date>
    </item>
  </channel>
</rss>

