<?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: Using a subsearch in a lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548812#M155702</link>
    <description>&lt;P&gt;Doh!&amp;nbsp; There are times when I forget how Splunk works and try treating it like a programming language.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 15:04:11 GMT</pubDate>
    <dc:creator>jwhughes58</dc:creator>
    <dc:date>2021-04-21T15:04:11Z</dc:date>
    <item>
      <title>Using a subsearch in a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548690#M155662</link>
      <description>&lt;P&gt;I've got two searches I'm trying to join into one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| localop 
| ldapsearch domain=my_domain search="(&amp;amp;(objectCategory=Computer)(userAccountControl:1.2.840.113556.1.4.803:=xxxx))" 
| table cn, dNSHostName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval fqdn="www.usatoday.com" 
| lookup dnslookup clienthost AS fqdn OUTPUT clientip as ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like is a table that has hostname, FQDN, and IP Address.&amp;nbsp; I've tried various subsearch methods to join them, but I must have something off since I either get an error or nothing.&amp;nbsp; Any thoughts?&lt;/P&gt;&lt;P&gt;TIA,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 21:29:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548690#M155662</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2021-04-20T21:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using a subsearch in a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548692#M155663</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| localop 
| ldapsearch domain=my_domain search="(&amp;amp;(objectCategory=Computer)(userAccountControl:1.2.840.113556.1.4.803:=xxxx))" 
| table cn, dNSHostName
| append [
  | makeresults 
  | eval fqdn="www.usatoday.com" 
  | lookup dnslookup clienthost AS fqdn OUTPUT clientip as ip
]
| stats values(*) as *&lt;/LI-CODE&gt;&lt;P&gt;or assuming that the cn is the fqdn, then this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| localop 
| ldapsearch domain=my_domain search="(&amp;amp;(objectCategory=Computer)(userAccountControl:1.2.840.113556.1.4.803:=xxxx))" 
| table cn, dNSHostName
| append [
  | makeresults 
  | eval fqdn="www.usatoday.com" 
  | lookup dnslookup clienthost AS fqdn OUTPUT clientip as ip
  | rename fqdn as cn
]
| stats values(*) as * by cn&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Apr 2021 22:46:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548692#M155663</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-04-20T22:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using a subsearch in a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548723#M155672</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/172955"&gt;@jwhughes58&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can simply add dnslookup into your first search. There is no need subsearch;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| localop 
| ldapsearch domain=my_domain search="(&amp;amp;(objectCategory=Computer)(userAccountControl:1.2.840.113556.1.4.803:=xxxx))" 
| lookup dnslookup clienthost AS dNSHostName OUTPUT clientip as ip
| table cn, dNSHostName, ip&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Apr 2021 05:56:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548723#M155672</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-04-21T05:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using a subsearch in a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548812#M155702</link>
      <description>&lt;P&gt;Doh!&amp;nbsp; There are times when I forget how Splunk works and try treating it like a programming language.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 15:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548812#M155702</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2021-04-21T15:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using a subsearch in a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548813#M155703</link>
      <description>&lt;P&gt;I see I explained my question badly bowesmana.&amp;nbsp; I was going to update it today with a better explanation, but scelikok answered it.&amp;nbsp; Thanks for the reply.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 15:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-subsearch-in-a-lookup/m-p/548813#M155703</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2021-04-21T15:06:54Z</dc:date>
    </item>
  </channel>
</rss>

