<?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 do I join data from two indexes on a certain field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-join-data-from-two-indexes-on-a-certain-field/m-p/627468#M218038</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i am using a search using internal index but i want to add a field values which is in other index = &lt;A href="https://invesco.splunkcloud.com/en-US/app/9902/search?earliest=-7d%40h&amp;amp;latest=now&amp;amp;q=search%20host%3DUSCXA45PAWP255&amp;amp;sid=1674052108.24757_75409CED-3014-4713-B5A8-87E0E9370FFA&amp;amp;display.page.search.mode=verbose&amp;amp;dispatch.sample_ratio=1&amp;amp;workload_pool=standard_perf#" target="_blank" rel="noopener"&gt;wineventlog&lt;/A&gt;&lt;/P&gt;&lt;P&gt;below is the i am using from internal index&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the search i want to add a field to table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2023 12:54:40 GMT</pubDate>
    <dc:creator>sekhar463</dc:creator>
    <dc:date>2023-10-19T12:54:40Z</dc:date>
    <item>
      <title>How do I join data from two indexes on a certain field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-join-data-from-two-indexes-on-a-certain-field/m-p/627468#M218038</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i am using a search using internal index but i want to add a field values which is in other index = &lt;A href="https://invesco.splunkcloud.com/en-US/app/9902/search?earliest=-7d%40h&amp;amp;latest=now&amp;amp;q=search%20host%3DUSCXA45PAWP255&amp;amp;sid=1674052108.24757_75409CED-3014-4713-B5A8-87E0E9370FFA&amp;amp;display.page.search.mode=verbose&amp;amp;dispatch.sample_ratio=1&amp;amp;workload_pool=standard_perf#" target="_blank" rel="noopener"&gt;wineventlog&lt;/A&gt;&lt;/P&gt;&lt;P&gt;below is the i am using from internal index&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the search i want to add a field to table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 12:54:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-join-data-from-two-indexes-on-a-certain-field/m-p/627468#M218038</guid>
      <dc:creator>sekhar463</dc:creator>
      <dc:date>2023-10-19T12:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I join data from two indexes on a certain field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-join-data-from-two-indexes-on-a-certain-field/m-p/627469#M218039</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244375"&gt;@sekhar463&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;this search cannot run because the Splunk searches run as a pipe, so, if you search for index=_internal at the beginning, you cannot search for another index after because you haven't events from the second index.&lt;/P&gt;&lt;P&gt;You can do something like you described using append but the results of the second search must be less than 50,000 otherwise the subsearch for the second index doesn't give you all the result.&lt;/P&gt;&lt;P&gt;As I said you could use append or (better) you could both the searches in the main search, so you haven't the limit of 50,000 results, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=_internal source=*metrics.log group=tcpin_connections) OR (index=ivz_wintel_wineventlog)
| eval Host=coalesce(hostname, sourceHost), age=(now()-_time)
| stats
   min(age) AS age
   max(_time) AS LastTime
   BY Host
| convert ctime(LastTime) AS "Last Active On"
| eval Status=if(age&amp;lt; 7200,"Running","DOWN")
| rename age AS Age
| eval Age=tostring(Age,"duration")
| sort Status
| table Host Status Age "Last Active On"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 14:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-join-data-from-two-indexes-on-a-certain-field/m-p/627469#M218039</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-01-18T14:53:10Z</dc:date>
    </item>
  </channel>
</rss>

