<?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 use a lookup table in a Splunk query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400380#M116004</link>
    <description>&lt;P&gt;I suggest you go through the &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchTutorial/WelcometotheSearchTutorial"&gt;Search Tutorial&lt;/A&gt; from the beginning. It includes &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchTutorial/Usefieldlookups"&gt;a step for enriching data with a CSV lookup file&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2018 17:03:00 GMT</pubDate>
    <dc:creator>ChrisG</dc:creator>
    <dc:date>2018-05-16T17:03:00Z</dc:date>
    <item>
      <title>How to use a lookup table in a Splunk query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400378#M116002</link>
      <description>&lt;P&gt;I have a lookup excel sheet with the application name, hostname, and IP address. I want to use it in a Splunk query and how shall I do it?&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 15:31:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400378#M116002</guid>
      <dc:creator>abhi04</dc:creator>
      <dc:date>2018-05-16T15:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table in a Splunk query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400379#M116003</link>
      <description>&lt;P&gt;You wanna read this &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/Knowledge/Aboutlookupsandfieldactions"&gt;chapter of the docs&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 15:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400379#M116003</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-16T15:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table in a Splunk query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400380#M116004</link>
      <description>&lt;P&gt;I suggest you go through the &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchTutorial/WelcometotheSearchTutorial"&gt;Search Tutorial&lt;/A&gt; from the beginning. It includes &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchTutorial/Usefieldlookups"&gt;a step for enriching data with a CSV lookup file&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 17:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400380#M116004</guid>
      <dc:creator>ChrisG</dc:creator>
      <dc:date>2018-05-16T17:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table in a Splunk query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400381#M116005</link>
      <description>&lt;P&gt;You should save your excel spreadsheet as a csv (comma-separated values) file, making sure to follow these guidelines:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;The table in the CSV file should have at least two columns. One column represents a field with a set of values that includes values belonging to a field in your events. The column does not have to have the same name as the event field. Any column can have multiple instances of the same value, which is a multivalued field.&lt;/LI&gt;
&lt;LI&gt;The characters in the CSV file must be plain ASCII text and valid UTF-8 characters. Non-UTF-8 characters are not supported.&lt;/LI&gt;
&lt;LI&gt;CSV files cannot have "\r" line endings (OSX 9 or earlier)&lt;/LI&gt;
&lt;LI&gt;CSV files cannot have header rows that exceed 4096 characters.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Source: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/Knowledge/Usefieldlookupstoaddinformationtoyourevents"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.0/Knowledge/Usefieldlookupstoaddinformationtoyourevents&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Next, you'll need to upload the csv file to Splunk. You can do this by following these steps:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Select Settings &amp;gt; Lookups to go to the Lookups manager page.&lt;/LI&gt;
&lt;LI&gt;In the Actions column, click Add new next to Lookup table files.&lt;/LI&gt;
&lt;LI&gt;Select a Destination app from the list.
Your lookup table file is saved in the directory where the application resides. For example: $SPLUNK_HOME/etc/users///lookups/.&lt;/LI&gt;
&lt;LI&gt;Click Choose File to look for the CSV file to upload.&lt;/LI&gt;
&lt;LI&gt;Enter the destination filename. This is the name the lookup table file will have on the Splunk server. If you are uploading a gzipped CSV file, enter a filename ending in ".gz". If you are uploading a plaintext CSV file, use a filename ending in ".csv".&lt;/LI&gt;
&lt;LI&gt;Click Save.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Source: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/Knowledge/Usefieldlookupstoaddinformationtoyourevents#Upload_the_lookup_table_file"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.0/Knowledge/Usefieldlookupstoaddinformationtoyourevents#Upload_the_lookup_table_file&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;After the file is in Splunk, you should create a lookup definition. The details for that are here:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/Knowledge/Usefieldlookupstoaddinformationtoyourevents#Create_a_CSV_lookup_definition"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.0/Knowledge/Usefieldlookupstoaddinformationtoyourevents#Create_a_CSV_lookup_definition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Once the lookup is properly defined, you can use these commands for interacting with it: &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchReference/Lookup"&gt;lookup&lt;/A&gt; - to consult the contents of the lookup file and use fields from the lookup to enrich your event data &lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchReference/Inputlookup"&gt;inputlookup&lt;/A&gt; - to display the contents of the lookup file&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchReference/Outputlookup"&gt;outputlookup&lt;/A&gt; - to append to the lookup file or replace its contents entirely&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 17:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-Splunk-query/m-p/400381#M116005</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-05-16T17:03:07Z</dc:date>
    </item>
  </channel>
</rss>

