<?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 Searching and matching from two different indexes and retrieving values from one index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Searching-and-matching-from-two-different-indexes-and-retrieving/m-p/499544#M195026</link>
    <description>&lt;P&gt;I have two indexes that contain the same ip address but only one index contains hostnames for the ip addresses. How can I search and match the ip addresses from both indexes in the same query and table out each ip address with their corresponding hostname?&lt;/P&gt;</description>
    <pubDate>Sun, 01 Dec 2019 16:30:22 GMT</pubDate>
    <dc:creator>cald0002</dc:creator>
    <dc:date>2019-12-01T16:30:22Z</dc:date>
    <item>
      <title>Searching and matching from two different indexes and retrieving values from one index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-and-matching-from-two-different-indexes-and-retrieving/m-p/499544#M195026</link>
      <description>&lt;P&gt;I have two indexes that contain the same ip address but only one index contains hostnames for the ip addresses. How can I search and match the ip addresses from both indexes in the same query and table out each ip address with their corresponding hostname?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 16:30:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-and-matching-from-two-different-indexes-and-retrieving/m-p/499544#M195026</guid>
      <dc:creator>cald0002</dc:creator>
      <dc:date>2019-12-01T16:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Searching and matching from two different indexes and retrieving values from one index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-and-matching-from-two-different-indexes-and-retrieving/m-p/499545#M195027</link>
      <description>&lt;P&gt;Hi cald0002,&lt;/P&gt;

&lt;P&gt;Give this a try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(SPL to get events from index 1) OR (SPL to get events from index 2)
| stats values(hostname) AS hostname by ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You might need to adapt the query to match the &lt;CODE&gt;hostname&lt;/CODE&gt; and &lt;CODE&gt;ip&lt;/CODE&gt; fields according to your events.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 20:37:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-and-matching-from-two-different-indexes-and-retrieving/m-p/499545#M195027</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-12-01T20:37:49Z</dc:date>
    </item>
  </channel>
</rss>

