<?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: having some trouble with a lookup table. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83477#M17352</link>
    <description>&lt;P&gt;That was the ticket.   I wasn't aware that the column name in my lookup table needed to be a valid field.  I changed it to "host" and now it works like a champ.&lt;/P&gt;

&lt;P&gt;Thanks all!&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2011 21:43:31 GMT</pubDate>
    <dc:creator>mloven</dc:creator>
    <dc:date>2011-09-29T21:43:31Z</dc:date>
    <item>
      <title>having some trouble with a lookup table.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83472#M17347</link>
      <description>&lt;P&gt;Hi all.  I'm having some issues getting a lookup table to work properly.  Here are the pertinent details:&lt;/P&gt;

&lt;P&gt;I have a csv file (called combined.csv) in /opt/splunk/etc/apps/search/lookups that has two columns.  It looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ipaddress,resolved
192.168.1.1,host1
192.168.1.2,host2
192.168.1.3,host3
and so on...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have this in my /opt/splunk/apps/search/local/transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dns_lookup]
filename = combined.csv
max_matches = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this in my /opt/splunk/apps/search/local/props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dns_lookup]
LOOKUP-dns = dns_lookup ipaddress OUTPUT resolved
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've restarted splunk multiple times.&lt;/P&gt;

&lt;P&gt;Basically, I followed the instructions for using a static lookup table &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/knowledge/Addfieldsfromexternaldatasources"&gt;here&lt;/A&gt; but I'm not getting the results I was shooting for.  I was hoping that the "resolved" field would show up when I did a search, but I'm seeing no new fields.&lt;/P&gt;

&lt;P&gt;I don't really even know where to begin troubleshooting this one.  Anyone have any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 05:44:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83472#M17347</guid>
      <dc:creator>mloven</dc:creator>
      <dc:date>2011-09-29T05:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: having some trouble with a lookup table.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83473#M17348</link>
      <description>&lt;P&gt;make sure you have the sourcetype dns_lookup, because [stanza_name] is the sourcetype, host, or source to which this lookup applies and can't use regex-type syntax.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:55:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83473#M17348</guid>
      <dc:creator>hjwang</dc:creator>
      <dc:date>2020-09-28T09:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: having some trouble with a lookup table.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83474#M17349</link>
      <description>&lt;P&gt;Well, you can actually use a regex-like syntax for &lt;CODE&gt;[host::]&lt;/CODE&gt; and &lt;CODE&gt;[source::]&lt;/CODE&gt; (and also sourcetype stanzas if you really must).&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 13:19:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83474#M17349</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-09-29T13:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: having some trouble with a lookup table.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83475#M17350</link>
      <description>&lt;P&gt;ok, so I changed my props.conf to&lt;/P&gt;

&lt;P&gt;[syslog]&lt;BR /&gt;
LOOKUP-dns = dns_lookup ipaddress OUTPUT resolved&lt;/P&gt;

&lt;P&gt;I missed the part where that stanza name had to refer to the sourcetype (or source, host, etc).   All of the events on this system are of the syslog sourcetype.&lt;/P&gt;

&lt;P&gt;I've restarted again, but I'm still getting the same results.&lt;/P&gt;

&lt;P&gt;EDIT...   sorry... can't change the formatting in my comment.  That props.conf stanza should look exactly like my original one, except the [dns_lookup] has been replaced by [syslog].&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 20:25:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83475#M17350</guid>
      <dc:creator>mloven</dc:creator>
      <dc:date>2011-09-29T20:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: having some trouble with a lookup table.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83476#M17351</link>
      <description>&lt;P&gt;Make sure that field "ipaddress" is also in your data with a sourcetype of "syslog". The "ipaddress" field with a sourcetype of syslog has to match the first column in your combined.csv file of "ipaddress". Here is an example of what should work:&lt;/P&gt;

&lt;P&gt;Sample syslog:&lt;BR /&gt;
Sep 29 15:57:36 acmepayroll sshd[14867]: Failed password for invalid user rpm from 110.172.158.2 port 33907 ssh2&lt;/P&gt;

&lt;P&gt;The "110.172.158.2" must be assigned to the field "ipaddress". If it is not then you can pull the field in the transforms.conf file. &lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [syslog]
    LOOKUP-dns = dns_lookup ipaddress OUTPUTNEW resolved
    REPORT-dns = getip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dns_lookup]
filename = combined.csv
max_matches = 1
min_matches = 1

[getip]
REGEX = from\s+([^\s]+)
FORMAT = ipaddress::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Log back into Splunk and you should be able to run the following search:&lt;/P&gt;

&lt;P&gt;sourcetype=syslog | table ipaddress, resolved&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 20:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83476#M17351</guid>
      <dc:creator>tgow</dc:creator>
      <dc:date>2011-09-29T20:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: having some trouble with a lookup table.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83477#M17352</link>
      <description>&lt;P&gt;That was the ticket.   I wasn't aware that the column name in my lookup table needed to be a valid field.  I changed it to "host" and now it works like a champ.&lt;/P&gt;

&lt;P&gt;Thanks all!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 21:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/having-some-trouble-with-a-lookup-table/m-p/83477#M17352</guid>
      <dc:creator>mloven</dc:creator>
      <dc:date>2011-09-29T21:43:31Z</dc:date>
    </item>
  </channel>
</rss>

