<?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 Update existing records to add DNS hostname in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199073#M20770</link>
    <description>&lt;P&gt;Hiya all,&lt;/P&gt;

&lt;P&gt;Managed to get DNS lookups working today (slight variation on the instructions was required!), but I got asked if we could get the data added for previous records so people could search on that through the (default) search window)&lt;/P&gt;

&lt;P&gt;From what i've read, I understand that once the data is written, its immutable, but that an automatic lookup might help me out?&lt;/P&gt;

&lt;P&gt;Grateful if someone could point me in the right direction.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;Kieran&lt;/P&gt;</description>
    <pubDate>Tue, 02 Sep 2014 06:14:46 GMT</pubDate>
    <dc:creator>schnarked</dc:creator>
    <dc:date>2014-09-02T06:14:46Z</dc:date>
    <item>
      <title>Update existing records to add DNS hostname</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199073#M20770</link>
      <description>&lt;P&gt;Hiya all,&lt;/P&gt;

&lt;P&gt;Managed to get DNS lookups working today (slight variation on the instructions was required!), but I got asked if we could get the data added for previous records so people could search on that through the (default) search window)&lt;/P&gt;

&lt;P&gt;From what i've read, I understand that once the data is written, its immutable, but that an automatic lookup might help me out?&lt;/P&gt;

&lt;P&gt;Grateful if someone could point me in the right direction.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;Kieran&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2014 06:14:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199073#M20770</guid>
      <dc:creator>schnarked</dc:creator>
      <dc:date>2014-09-02T06:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Update existing records to add DNS hostname</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199074#M20771</link>
      <description>&lt;P&gt;First, a general suggestion: This is the best place to learn about lookups, because you can do it all from the GUI&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchTutorial/Usefieldlookups" target="_blank"&gt;Tutorial - Use Field Lookups&lt;/A&gt;. You don't have to manually edit &lt;CODE&gt;props.conf&lt;/CODE&gt; or &lt;CODE&gt;transforms.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now, unlike the tutorial, you want to use a script rather than a lookup &lt;EM&gt;table&lt;/EM&gt;. So, skip the sections of the tutorial that explain how to upload and share the lookup table. You will start with the lookup definition.&lt;/P&gt;

&lt;P&gt;Specific steps:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Go to &lt;STRONG&gt;Settings&lt;/STRONG&gt; and choose &lt;STRONG&gt;Lookups&lt;/STRONG&gt;. &lt;/LI&gt;
&lt;LI&gt;Skip the &lt;STRONG&gt;Lookup Table Files&lt;/STRONG&gt;. Under &lt;STRONG&gt;Lookup Definitions&lt;/STRONG&gt;, note that there is
&lt;EM&gt;already&lt;/EM&gt; a lookup named &lt;CODE&gt;dnslookup&lt;/CODE&gt;. This is the one that you will use. It
should already be set with global sharing and read permissions for
everyone. You should not need to add anything, just confirm these settings
and fix them if needed. &lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Under &lt;STRONG&gt;Automatic Lookups&lt;/STRONG&gt;, you will need to create a &lt;STRONG&gt;new&lt;/STRONG&gt; automatic lookup&lt;BR /&gt;
for each sourcetype where you want the DNS lookup performed. Take a look&lt;BR /&gt;
at the tutorial for details. Following are the settings for the fields:&lt;/P&gt;

&lt;P&gt;Destination app: probably Search, but your choice&lt;BR /&gt;&lt;BR /&gt;
Name: choose a unique name for the automatic lookup&lt;BR /&gt;&lt;BR /&gt;
Lookup table: choose &lt;CODE&gt;dnslookup&lt;/CODE&gt; from the list&lt;BR /&gt;&lt;BR /&gt;
Apply to: Sourcetype and carefully enter the exact name of the sourcetype - no wildcards!&lt;BR /&gt;&lt;BR /&gt;
Lookup input fields: clientip &lt;EM&gt;your_ip_field_name&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;
Lookup output fields: clienthost &lt;EM&gt;your_host_field_name&lt;/EM&gt;  &lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Not that for the input and output fields, there are two boxes. The left box should contain the field names that the script uses. The right box is for the name of the corresponding field in your data. After you have created the automatic lookup, you will probably want to set the permissions for it to &lt;CODE&gt;global&lt;/CODE&gt; for everyone.&lt;/P&gt;

&lt;P&gt;Finally, there are other answers that might also help:&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/8051/dns-lookup-via-splunk" target="_blank"&gt;DNS lookup via Splunk&lt;/A&gt; is one of the best.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199074#M20771</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2020-09-28T17:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Update existing records to add DNS hostname</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199075#M20772</link>
      <description>&lt;P&gt;Thanks for this - provides exactly the info that was required. It would be great if the Splunk doco was updated to reflect, this much, much, much simpler way of doing dns lookups!&lt;/P&gt;

&lt;P&gt;One thing for other people who might do this - I did notice is that when you're doing searches (i.e. hostname="devicename"), it is slow for the 1st time that the info is added to the record. Once its added, its all fast again, which is as you would expect as its updating historical records, but once its there (which is the case for new info anyways), its all good!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 01:46:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199075#M20772</guid>
      <dc:creator>schnarked</dc:creator>
      <dc:date>2014-09-03T01:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Update existing records to add DNS hostname</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199076#M20773</link>
      <description>&lt;P&gt;Actually, Splunk isn't adding any info to the record - you can't update existing data. However, Splunk does cache the data it has looked up, therefore you see a good speed increase.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 20:42:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Update-existing-records-to-add-DNS-hostname/m-p/199076#M20773</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-03T20:42:50Z</dc:date>
    </item>
  </channel>
</rss>

