<?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 Joining fields from three different indexes and sourcetypes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330220#M98287</link>
    <description>&lt;P&gt;I have three searches that I want to merge into one single table as search output. I will try to explain my case through three individual searches:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Search 1 (base search)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="website_monitoring" sourcetype="url_check") title="wiki-via-bfrm-lbs" `filter_service_period_hours` total_time &amp;gt; `response_time_threshold` | table _time total_time time_namelookup corr_id | sort -_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Output fields:&lt;/EM&gt;&lt;BR /&gt;
- &lt;CODE&gt;_time&lt;/CODE&gt;&lt;BR /&gt;
- &lt;CODE&gt;total_time&lt;/CODE&gt;&lt;BR /&gt;
- &lt;CODE&gt;time_namelookup&lt;/CODE&gt;&lt;BR /&gt;
- &lt;CODE&gt;corr_id&lt;/CODE&gt;&lt;BR /&gt;
&lt;EM&gt;Example event:&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2017-04-13T10:06:03+0000 title="wiki-via-bfrm-lbs" corr_id=1492077961074495474 response_code=200 expected_content=True total_time=2604.000 time_redirect=0 time_appconnect=0 time_connect=2515.000 time_namelookup=2513.000 time_pretransfer=2515.000 time_starttransfer=2573.000 request_time=2604.000 timed_out=False content_size=55914 url_effective=http://mydomain.com/wiki/pages/viewpage.action?pageId=65538&amp;amp;corr_id=1492077961074495474&amp;amp;script=wiki-via-bfrm-lbs url=http://mydomain.com/wiki/pages/viewpage.action?pageId=65538 content="Let&amp;amp;#39;s edit this page (step 3 of 9) - Demonstration Space "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Search 2 (additional fields based on base search)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=confluence_prod sourcetype="confluence:app:access" corr_id=1492068301527265031 | table requesttime_in_ms 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Correlation fields&lt;/EM&gt;&lt;BR /&gt;
- field &lt;CODE&gt;corr_id&lt;/CODE&gt; is present in &lt;STRONG&gt;Search 1&lt;/STRONG&gt; and &lt;STRONG&gt;Search 2&lt;/STRONG&gt;. Value &lt;CODE&gt;1492068301527265031&lt;/CODE&gt; is ment to be retrieved from &lt;CODE&gt;Search 1&lt;/CODE&gt;&lt;BR /&gt;
&lt;EM&gt;Output fields&lt;/EM&gt;&lt;BR /&gt;
- &lt;CODE&gt;requesttime_in_ms&lt;/CODE&gt;&lt;BR /&gt;
&lt;EM&gt;Example events&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[2017-04-13T10:06:03+0000] ip=172.0.0.1 user=TestUser http_method=GET url=“/wiki/pages/viewpage.action?pageId=65538&amp;amp;corr_id=1492077961074495474&amp;amp;script=wiki-via-bfrm-lbs" protocol_version=HTTP/1.1 http_status_code=200 responsesize_bytes=55977 requesttime_in_ms=2176 referer="-" user_agent="curl/7.29.0"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Search 3 (additional fields based on base search)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="os" sourcetype="cpu" host="aca-db*" cpu="all" earliest="04/13/2017:10:06:00" latest="04/13/2017:10:06:59" | eval total_usage=(100-pctIdle) | stats avg(total_usage) as cpu_usage
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Correlation fields&lt;/EM&gt;&lt;BR /&gt;
- fields &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; in &lt;STRONG&gt;Search 2&lt;/STRONG&gt; shall be equal to &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; in &lt;STRONG&gt;Search 1&lt;/STRONG&gt;. &lt;BR /&gt;
&lt;EM&gt;Output fields&lt;/EM&gt;&lt;BR /&gt;
- &lt;CODE&gt;cpu_usage&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Desired search output (merged)&lt;/STRONG&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;_time&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;total_time&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;time_namelookup&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;requesttime_in_ms&lt;/CODE&gt; (from &lt;STRONG&gt;Search 2&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;cpu_usage&lt;/CODE&gt; (from &lt;STRONG&gt;Search 3&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;STRONG&gt;What I have tried so far&lt;/STRONG&gt;&lt;BR /&gt;
I have been reading different answers and Splunk doc about &lt;CODE&gt;append&lt;/CODE&gt;, &lt;CODE&gt;join&lt;/CODE&gt;, &lt;CODE&gt;multisearch&lt;/CODE&gt;. I wanted to give a try solution described in the answer: &lt;A href="https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html"&gt;https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html&lt;/A&gt;, but so far I have not succeeded for all three searches. &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Search (merging output from Search 1, Search 2 and Search 3)&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="website_monitoring" sourcetype="url_check" title="wiki-via-bfrm-lbs" total_time &amp;gt; `response_time_threshold`) 
OR (index="confluence_prod" sourcetype="confluence:app:access") `filter_service_period_hours` 
OR (index="os" sourcetype="cpu" host="aca-db*" cpu="all" earliest="04/13/2017:12:05:05" latest="04/13/2017:12:07:05")
| eval corr_id-{index}=corr_id 
| eval Time=strftime(_time, "%F %T") 
| eval total_usage=(100-pctIdle)
| stats values(corr_id-*) AS * values(total_time) as "Response time Monitoring" values(requesttime_in_ms) as "Response time App" values(time_namelookup) as "DNS lookup" avg(total_usage) as cpu_usage by corr_id Time
| mvexpand website_monitoring  
| mvexpand confluence_prod 
| where website_monitoring=confluence_prod 
| fields - website_monitoring,confluence_prod
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Output&lt;/EM&gt;&lt;BR /&gt;
Output shows correct values for fields&lt;BR /&gt;
- &lt;CODE&gt;_time&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;BR /&gt;
- &lt;CODE&gt;total_time&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;BR /&gt;
- &lt;CODE&gt;time_namelookup&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;BR /&gt;
- &lt;CODE&gt;requesttime_in_ms&lt;/CODE&gt; (from &lt;STRONG&gt;Search 2&lt;/STRONG&gt;)&lt;/P&gt;

&lt;P&gt;but for &lt;CODE&gt;cpu_usage&lt;/CODE&gt; (from &lt;STRONG&gt;Search 3&lt;/STRONG&gt;) I dont get any value in output.&lt;/P&gt;

&lt;P&gt;I would really appreciate tips/hints on how to fulfil desired search output.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2017 10:49:29 GMT</pubDate>
    <dc:creator>ismarslomic</dc:creator>
    <dc:date>2017-04-14T10:49:29Z</dc:date>
    <item>
      <title>Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330220#M98287</link>
      <description>&lt;P&gt;I have three searches that I want to merge into one single table as search output. I will try to explain my case through three individual searches:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Search 1 (base search)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="website_monitoring" sourcetype="url_check") title="wiki-via-bfrm-lbs" `filter_service_period_hours` total_time &amp;gt; `response_time_threshold` | table _time total_time time_namelookup corr_id | sort -_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Output fields:&lt;/EM&gt;&lt;BR /&gt;
- &lt;CODE&gt;_time&lt;/CODE&gt;&lt;BR /&gt;
- &lt;CODE&gt;total_time&lt;/CODE&gt;&lt;BR /&gt;
- &lt;CODE&gt;time_namelookup&lt;/CODE&gt;&lt;BR /&gt;
- &lt;CODE&gt;corr_id&lt;/CODE&gt;&lt;BR /&gt;
&lt;EM&gt;Example event:&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2017-04-13T10:06:03+0000 title="wiki-via-bfrm-lbs" corr_id=1492077961074495474 response_code=200 expected_content=True total_time=2604.000 time_redirect=0 time_appconnect=0 time_connect=2515.000 time_namelookup=2513.000 time_pretransfer=2515.000 time_starttransfer=2573.000 request_time=2604.000 timed_out=False content_size=55914 url_effective=http://mydomain.com/wiki/pages/viewpage.action?pageId=65538&amp;amp;corr_id=1492077961074495474&amp;amp;script=wiki-via-bfrm-lbs url=http://mydomain.com/wiki/pages/viewpage.action?pageId=65538 content="Let&amp;amp;#39;s edit this page (step 3 of 9) - Demonstration Space "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Search 2 (additional fields based on base search)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=confluence_prod sourcetype="confluence:app:access" corr_id=1492068301527265031 | table requesttime_in_ms 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Correlation fields&lt;/EM&gt;&lt;BR /&gt;
- field &lt;CODE&gt;corr_id&lt;/CODE&gt; is present in &lt;STRONG&gt;Search 1&lt;/STRONG&gt; and &lt;STRONG&gt;Search 2&lt;/STRONG&gt;. Value &lt;CODE&gt;1492068301527265031&lt;/CODE&gt; is ment to be retrieved from &lt;CODE&gt;Search 1&lt;/CODE&gt;&lt;BR /&gt;
&lt;EM&gt;Output fields&lt;/EM&gt;&lt;BR /&gt;
- &lt;CODE&gt;requesttime_in_ms&lt;/CODE&gt;&lt;BR /&gt;
&lt;EM&gt;Example events&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[2017-04-13T10:06:03+0000] ip=172.0.0.1 user=TestUser http_method=GET url=“/wiki/pages/viewpage.action?pageId=65538&amp;amp;corr_id=1492077961074495474&amp;amp;script=wiki-via-bfrm-lbs" protocol_version=HTTP/1.1 http_status_code=200 responsesize_bytes=55977 requesttime_in_ms=2176 referer="-" user_agent="curl/7.29.0"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Search 3 (additional fields based on base search)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="os" sourcetype="cpu" host="aca-db*" cpu="all" earliest="04/13/2017:10:06:00" latest="04/13/2017:10:06:59" | eval total_usage=(100-pctIdle) | stats avg(total_usage) as cpu_usage
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Correlation fields&lt;/EM&gt;&lt;BR /&gt;
- fields &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; in &lt;STRONG&gt;Search 2&lt;/STRONG&gt; shall be equal to &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; in &lt;STRONG&gt;Search 1&lt;/STRONG&gt;. &lt;BR /&gt;
&lt;EM&gt;Output fields&lt;/EM&gt;&lt;BR /&gt;
- &lt;CODE&gt;cpu_usage&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Desired search output (merged)&lt;/STRONG&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;_time&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;total_time&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;time_namelookup&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;requesttime_in_ms&lt;/CODE&gt; (from &lt;STRONG&gt;Search 2&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;cpu_usage&lt;/CODE&gt; (from &lt;STRONG&gt;Search 3&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;STRONG&gt;What I have tried so far&lt;/STRONG&gt;&lt;BR /&gt;
I have been reading different answers and Splunk doc about &lt;CODE&gt;append&lt;/CODE&gt;, &lt;CODE&gt;join&lt;/CODE&gt;, &lt;CODE&gt;multisearch&lt;/CODE&gt;. I wanted to give a try solution described in the answer: &lt;A href="https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html"&gt;https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html&lt;/A&gt;, but so far I have not succeeded for all three searches. &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Search (merging output from Search 1, Search 2 and Search 3)&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="website_monitoring" sourcetype="url_check" title="wiki-via-bfrm-lbs" total_time &amp;gt; `response_time_threshold`) 
OR (index="confluence_prod" sourcetype="confluence:app:access") `filter_service_period_hours` 
OR (index="os" sourcetype="cpu" host="aca-db*" cpu="all" earliest="04/13/2017:12:05:05" latest="04/13/2017:12:07:05")
| eval corr_id-{index}=corr_id 
| eval Time=strftime(_time, "%F %T") 
| eval total_usage=(100-pctIdle)
| stats values(corr_id-*) AS * values(total_time) as "Response time Monitoring" values(requesttime_in_ms) as "Response time App" values(time_namelookup) as "DNS lookup" avg(total_usage) as cpu_usage by corr_id Time
| mvexpand website_monitoring  
| mvexpand confluence_prod 
| where website_monitoring=confluence_prod 
| fields - website_monitoring,confluence_prod
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Output&lt;/EM&gt;&lt;BR /&gt;
Output shows correct values for fields&lt;BR /&gt;
- &lt;CODE&gt;_time&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;BR /&gt;
- &lt;CODE&gt;total_time&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;BR /&gt;
- &lt;CODE&gt;time_namelookup&lt;/CODE&gt; (from &lt;STRONG&gt;Search 1&lt;/STRONG&gt;)&lt;BR /&gt;
- &lt;CODE&gt;requesttime_in_ms&lt;/CODE&gt; (from &lt;STRONG&gt;Search 2&lt;/STRONG&gt;)&lt;/P&gt;

&lt;P&gt;but for &lt;CODE&gt;cpu_usage&lt;/CODE&gt; (from &lt;STRONG&gt;Search 3&lt;/STRONG&gt;) I dont get any value in output.&lt;/P&gt;

&lt;P&gt;I would really appreciate tips/hints on how to fulfil desired search output.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 10:49:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330220#M98287</guid>
      <dc:creator>ismarslomic</dc:creator>
      <dc:date>2017-04-14T10:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330221#M98288</link>
      <description>&lt;P&gt;If I may - nicely done question!  It is a hard enough one that it'll take some thinking and staring at, though.  Is there any chance you could paste in a few events of each type?  I tend to be able able to visualize these things better when I can see a bit of the data.&lt;/P&gt;

&lt;P&gt;Anyway, &lt;/P&gt;

&lt;P&gt;Partial "potential enhancement" for search 1 and 2.&lt;/P&gt;

&lt;P&gt;I think your problem with the multiple results from those two is because of your stats command.  You have&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values(corr_id-*) AS * &amp;lt;more stuff&amp;gt; by Time  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I think what you need might be &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats &amp;lt;do NOT include the values for corr_id&amp;gt; &amp;lt;more stuff&amp;gt; BY corr_id, Time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I could be wrong about that.  But &lt;CODE&gt;values(something)&lt;/CODE&gt; by _time is going to give you for each time slice however many values of &lt;CODE&gt;something&lt;/CODE&gt; you had in that time slice, and I'm positive this is not what you want.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 13:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330221#M98288</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-04-14T13:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330222#M98289</link>
      <description>&lt;P&gt;What is all the &lt;CODE&gt;| eval corr_id-{index}=corr_id&lt;/CODE&gt; about?  I am not trying to say there's anything wrong with it, I just don't understand what you are doing there, or especially why you are doing it.&lt;/P&gt;

&lt;P&gt;Yes, some source data would be very helpful.   Even one event from each (especially if they all "match", though source three you may need one "non-match" as well so we can see how they do NOT connect, too.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;AH - Search three is just grabbing a quick CPU value from the time period involved based on the host, right?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 13:05:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330222#M98289</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-04-14T13:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330223#M98290</link>
      <description>&lt;P&gt;Because you have those macros in that spot with no pipe before them, I can't tell how you would go about making a global search that got you the same results.&lt;/P&gt;

&lt;P&gt;So, here's an &lt;CODE&gt;appendpipe&lt;/CODE&gt; and &lt;CODE&gt;map&lt;/CODE&gt; version. The second &lt;CODE&gt;appendpipe&lt;/CODE&gt; could also be written as an &lt;CODE&gt;append&lt;/CODE&gt;, YMMV. &lt;/P&gt;

&lt;P&gt;The escaping on the double-quotes inside the search will probably need to be corrected, since that's pretty finnicky.  While testing, just start with &lt;CODE&gt;corr_id=1492068301527265031&lt;/CODE&gt; in the first search and  add one section at a time and debug until it's working.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="website_monitoring" sourcetype="url_check") title="wiki-via-bfrm-lbs" `filter_service_period_hours` total_time &amp;gt; `response_time_threshold` | table _time total_time time_namelookup corr_id | sort -_time

| appendpipe [ | map maxsearches=0 search="index=confluence_prod sourcetype=\"confluence:app:access\" corr_id=$corr_id$ | table corr_id requesttime_in_ms"]

| appendpipe [| addinfo | dedup info_min_time | map search="earliest=$info_min_time$ latest=$info_max_time$ index=\"os\" sourcetype=\"cpu\" host=\"aca-db*\" cpu=\"all\"" | eval total_usage=(100-pctIdle) | stats avg(total_usage) as cpu_usage]

| eventstats max(cpu_usage) as cpu_usage
| stats values(*) as * by corr_id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:06:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330223#M98290</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-14T15:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330224#M98291</link>
      <description>&lt;P&gt;Thanks, @rich7177! Group by corr_id  helped! Now I get the results Im expecting for Search 1 and 2. Need to extend it for Search 3. Will post updated solution when done so others can reuse it as well.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:33:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330224#M98291</guid>
      <dc:creator>ismarslomic</dc:creator>
      <dc:date>2017-04-14T15:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330225#M98292</link>
      <description>&lt;P&gt;Hehe, I was wondering about the same. But it is already explained by original author of the search query in Answer: &lt;A href="https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html"&gt;https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html&lt;/A&gt; (see question from @wrangler2x)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:36:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330225#M98292</guid>
      <dc:creator>ismarslomic</dc:creator>
      <dc:date>2017-04-14T15:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330226#M98293</link>
      <description>&lt;P&gt;Thanks, @DalJeanis. I have tried to execute line 1 - 3 + 8 like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="website_monitoring" sourcetype="url_check") title="wiki-via-bfrm-lbs" | table _time total_time time_namelookup corr_id | sort -_time
 | appendpipe [ | map maxsearches=0 search="index=confluence_prod sourcetype=confluence:app:access corr_id=1492068301527265031 | table corr_id requesttime_in_ms"]
 | stats values(*) as * by _time corr_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But column &lt;CODE&gt;requesttime_in_ms&lt;/CODE&gt; is missing in output. To avoid too much complexity, I have removed completely usage of custom macros in query above.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 16:23:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330226#M98293</guid>
      <dc:creator>ismarslomic</dc:creator>
      <dc:date>2017-04-14T16:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330227#M98294</link>
      <description>&lt;P&gt;Example events added for Search 1 and 2. Search 3 events are very simple, like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;all       8.36       0.00       5.40       0.00      86.24
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps. Im still working with including the third search into query mentioned in "What I have tried so far", with addition of &lt;CODE&gt;corr_id&lt;/CODE&gt; for grouping. Still no luck.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 19:50:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330227#M98294</guid>
      <dc:creator>ismarslomic</dc:creator>
      <dc:date>2017-04-14T19:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330228#M98295</link>
      <description>&lt;P&gt;Hi ismarslomic,&lt;/P&gt;

&lt;P&gt;I'm on holiday right now ... &lt;/P&gt;

&lt;P&gt;Don't expect any answer within the next two weeks, but I'm happy to help when I'm back &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 09:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330228#M98295</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2017-04-15T09:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Joining fields from three different indexes and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330229#M98296</link>
      <description>&lt;P&gt;@rich7177 or @DalJeanis: would you be able to support me finalising the last search? I hope that updates I have done in my question is giving you more insight into the complexity and events?&lt;/P&gt;</description>
      <pubDate>Sun, 16 Apr 2017 15:22:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-fields-from-three-different-indexes-and-sourcetypes/m-p/330229#M98296</guid>
      <dc:creator>ismarslomic</dc:creator>
      <dc:date>2017-04-16T15:22:37Z</dc:date>
    </item>
  </channel>
</rss>

