<?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 Re: How to get data from two indexes? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392121#M70041</link>
    <description>&lt;P&gt;yes!! it partially answered my question.&lt;BR /&gt;
Thanks so much for your help!!&lt;BR /&gt;
Would love to see if there is a way to re-format the table to show the client IP address and client name once together with all DNS queries for the selected time frame.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Sep 2018 19:33:09 GMT</pubDate>
    <dc:creator>mpasha</dc:creator>
    <dc:date>2018-09-25T19:33:09Z</dc:date>
    <item>
      <title>How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392115#M70035</link>
      <description>&lt;P&gt;Good day everyone,&lt;BR /&gt;
i am dealing with an issue that i haven't been able to find an answer for so far. here is the problem:&lt;BR /&gt;
I have two indexes collecting data; one index collects from DHCP which have Client_IP address that has been assigned to a machine and the other index is DNS which collects Clients internet queries. DNS index have the same "Client_IP" field. now i want to be able to take the Client_IP from the DNS search; find the hostname  found in DHCP and create a table that includes time, Client_Name "from DHCP index" and Client_IP that matches the time of DNS query. DHCP data needs to have the closest time to the DNS query since DHCP can assign the same IP to a different client.&lt;BR /&gt;
really appreciate any help with this issue.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:22:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392115#M70035</guid>
      <dc:creator>mpasha</dc:creator>
      <dc:date>2020-09-29T21:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392116#M70036</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/140319"&gt;@mpasha&lt;/a&gt;&lt;BR /&gt;
If time and client_id have same value in both results than join with both fields.&lt;BR /&gt;
Like &lt;CODE&gt;|join time client_id&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Or else join with only client_id&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:22:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392116#M70036</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2020-09-29T21:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392117#M70037</link>
      <description>&lt;P&gt;here is the search based on your suggestion but it errors out!! I am pretty sure i am not using the proper syntax:&lt;BR /&gt;
index=dnsa OR index=dhcp Query_Type!=12|join Client_IP|table _time Client_IP Client_name DNS_Query&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:22:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392117#M70037</guid>
      <dc:creator>mpasha</dc:creator>
      <dc:date>2020-09-29T21:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392118#M70038</link>
      <description>&lt;P&gt;Hi @mpasha&lt;BR /&gt;
Can you try like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dnsa  Query_Type!=12 |table Client_Ip ,xxx,yyy |join Client_IP [search index=dhcp Query_Type!=12 |table Client_Ip ,xxx,yyy]|table _time Client_IP Client_name DNS_Query
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Sep 2018 18:38:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392118#M70038</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-09-25T18:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392119#M70039</link>
      <description>&lt;P&gt;it works if you manually search for a specific IP address like the following:&lt;/P&gt;

&lt;P&gt;index=dnsa Query_Type!=12 Client_IP=172.24.9.245|join Client_IP [search index=dhcp Client_IP=172.24.9.245]|table _time Client_IP Client_Name DNS_Query&lt;/P&gt;

&lt;P&gt;what i am looking for is something like a "lookup table" where the value of the client_IP is automatically picked and fed into the other search for the Client_Name value. the above search works perfectly if you are creating a form where you are searching for an IP and input the IP address manually!!&lt;BR /&gt;
is this even possible?&lt;BR /&gt;
by the way here is a sample output of the search for a certain IP.  how can i format it so that the user and IP is listed once together with all DNS_Queries??&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/255039-splunk-q.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:22:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392119#M70039</guid>
      <dc:creator>mpasha</dc:creator>
      <dc:date>2020-09-29T21:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392120#M70040</link>
      <description>&lt;P&gt;@mpasha &lt;/P&gt;

&lt;P&gt;Sorry I didn't get what do you want.&lt;BR /&gt;
If my answer helped you please up vote or accept as answer.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:14:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392120#M70040</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-09-25T19:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392121#M70041</link>
      <description>&lt;P&gt;yes!! it partially answered my question.&lt;BR /&gt;
Thanks so much for your help!!&lt;BR /&gt;
Would love to see if there is a way to re-format the table to show the client IP address and client name once together with all DNS queries for the selected time frame.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:33:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392121#M70041</guid>
      <dc:creator>mpasha</dc:creator>
      <dc:date>2018-09-25T19:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392122#M70042</link>
      <description>&lt;P&gt;Hi @mpasha&lt;BR /&gt;
Sorry up vote for answer not for comment.&lt;BR /&gt;
Ok&lt;BR /&gt;
What I understood filter by client ip and client name.&lt;/P&gt;

&lt;P&gt;Add end of your query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|Where client_,ip=xxxx and client_name="xxx"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:41:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392122#M70042</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-09-25T19:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392123#M70043</link>
      <description>&lt;P&gt;Hi @mpasha&lt;BR /&gt;
Did you get your answer.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392123#M70043</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-09-25T19:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get data from two indexes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392124#M70044</link>
      <description>&lt;P&gt;i did and have already did like the answer and accept it.&lt;BR /&gt;
am i missing something?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-data-from-two-indexes/m-p/392124#M70044</guid>
      <dc:creator>mpasha</dc:creator>
      <dc:date>2018-09-25T19:55:10Z</dc:date>
    </item>
  </channel>
</rss>

