<?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 DNS lookup failing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70053#M14254</link>
    <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I read &lt;A href="http://www.splunk.com/base/Documentation/4.2.2/Knowledge/Addfieldsfromexternaldatasources" target="_blank"&gt;http://www.splunk.com/base/Documentation/4.2.2/Knowledge/Addfieldsfromexternaldatasources&lt;/A&gt; and see my default transform.conf has &lt;/P&gt;

&lt;P&gt;# Example external lookup &lt;BR /&gt;&lt;BR /&gt;
[dnslookup]&lt;BR /&gt;&lt;BR /&gt;
external_cmd = external_lookup.py clienthost clientip&lt;BR /&gt;&lt;BR /&gt;
fields_list = clienthost clientip&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;But when I try to use it I get "Error in 'lookup' command: Could not find all of the specified lookup fields in the lookup table."&lt;/P&gt;

&lt;P&gt;I use:&lt;BR /&gt;
"Local User:" AND NOT DNS AND NOT close | rex field=_raw "User:\s+(?&lt;SRC&gt;.&lt;EM&gt;):.&lt;/EM&gt;\s+-&amp;gt;\s+(?&lt;DST&gt;.*):" | top limit 20 dst | lookup dnslookup dst&lt;/DST&gt;&lt;/SRC&gt;&lt;/P&gt;

&lt;P&gt;The logfile entries look like:&lt;/P&gt;

&lt;P&gt;Aug 25 23:00:22 Vigor: Local User: 192.168.1.8:50829 -&amp;gt; 22.58.244.67:80 (TCP)Web&lt;/P&gt;

&lt;P&gt;Thank you&lt;BR /&gt;
Markus&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:52:11 GMT</pubDate>
    <dc:creator>huaraz</dc:creator>
    <dc:date>2020-09-28T09:52:11Z</dc:date>
    <item>
      <title>DNS lookup failing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70053#M14254</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I read &lt;A href="http://www.splunk.com/base/Documentation/4.2.2/Knowledge/Addfieldsfromexternaldatasources" target="_blank"&gt;http://www.splunk.com/base/Documentation/4.2.2/Knowledge/Addfieldsfromexternaldatasources&lt;/A&gt; and see my default transform.conf has &lt;/P&gt;

&lt;P&gt;# Example external lookup &lt;BR /&gt;&lt;BR /&gt;
[dnslookup]&lt;BR /&gt;&lt;BR /&gt;
external_cmd = external_lookup.py clienthost clientip&lt;BR /&gt;&lt;BR /&gt;
fields_list = clienthost clientip&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;But when I try to use it I get "Error in 'lookup' command: Could not find all of the specified lookup fields in the lookup table."&lt;/P&gt;

&lt;P&gt;I use:&lt;BR /&gt;
"Local User:" AND NOT DNS AND NOT close | rex field=_raw "User:\s+(?&lt;SRC&gt;.&lt;EM&gt;):.&lt;/EM&gt;\s+-&amp;gt;\s+(?&lt;DST&gt;.*):" | top limit 20 dst | lookup dnslookup dst&lt;/DST&gt;&lt;/SRC&gt;&lt;/P&gt;

&lt;P&gt;The logfile entries look like:&lt;/P&gt;

&lt;P&gt;Aug 25 23:00:22 Vigor: Local User: 192.168.1.8:50829 -&amp;gt; 22.58.244.67:80 (TCP)Web&lt;/P&gt;

&lt;P&gt;Thank you&lt;BR /&gt;
Markus&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:52:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70053#M14254</guid>
      <dc:creator>huaraz</dc:creator>
      <dc:date>2020-09-28T09:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: DNS lookup failing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70054#M14255</link>
      <description>&lt;P&gt;I think I found the answer myself. I have to use the fields which are listed in the transform.conf.&lt;/P&gt;

&lt;P&gt;"Local User:" AND NOT DNS AND NOT close | rex field=_raw "User:s+(?&lt;SRC&gt;.):.s+-&amp;gt;s+(?&lt;DST&gt;.*):" | top limit 20 dst | eval clientip=dst | eval clienthost="unknown" | lookup dnslookup clientip&lt;/DST&gt;&lt;/SRC&gt;&lt;/P&gt;

&lt;P&gt;Markus&lt;/P&gt;</description>
      <pubDate>Sun, 04 Sep 2011 14:30:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70054#M14255</guid>
      <dc:creator>huaraz</dc:creator>
      <dc:date>2011-09-04T14:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: DNS lookup failing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70055#M14256</link>
      <description>&lt;P&gt;Looks like you needed: lookup dnslookup clientip as dst&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2012 02:50:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70055#M14256</guid>
      <dc:creator>lrhazi</dc:creator>
      <dc:date>2012-05-21T02:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: DNS lookup failing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70056#M14257</link>
      <description>&lt;P&gt;The search below is another option:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search&amp;gt; | lookup dnslookup clientip as dst | fillnull value=unknown
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just get rid of your two 'eval's.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2013 23:31:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70056#M14257</guid>
      <dc:creator>pryzrak</dc:creator>
      <dc:date>2013-11-15T23:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: DNS lookup failing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70057#M14258</link>
      <description>&lt;P&gt;I encountered a similar issue with syntax, which the posts above helped me solve.  I'm documenting the "why" as to the failed resolution for future reference.&lt;/P&gt;

&lt;P&gt;Initially I was submitting a search similar to:&lt;BR /&gt;
ClientIP="8.8.8.8" | lookup dnslookup ClientIP&lt;/P&gt;

&lt;P&gt;Results in error:&lt;BR /&gt;
"Error in 'lookup' command: Could not find all of the specified lookup fields in the lookup table"&lt;/P&gt;

&lt;P&gt;Within the dnslookup script, clientip and clienthost:&lt;BR /&gt;
1) are case sensitive&lt;BR /&gt;
2) set forward or reverse dns resolution&lt;BR /&gt;
3) are preconfigured in the dnslookup script&lt;BR /&gt;
4) are required for dnslookup to function&lt;/P&gt;

&lt;P&gt;These variables set functionality for forward or reverse dns resolution as flags/switches that must be present for the lookup to function correctly.  The command "AS ___" actually passes the field/variable to the dnslookup script for resolution.&lt;/P&gt;

&lt;P&gt;Correct lookup examples (with comparisons):&lt;BR /&gt;
Resolve-dns.ps1 -f "google[.]com"&lt;BR /&gt;
ClientHost="google[.]com" | lookup dnslookup clienthost AS ClientHost&lt;/P&gt;

&lt;P&gt;Resolve-dns.ps1 -r "8.8.8.8"&lt;BR /&gt;
ClientIP="8.8.8.8" | lookup dnslookup clientip AS ClientIP&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 17:32:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DNS-lookup-failing/m-p/70057#M14258</guid>
      <dc:creator>LeedhamB_80746</dc:creator>
      <dc:date>2017-10-11T17:32:42Z</dc:date>
    </item>
  </channel>
</rss>

