<?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: Lookup csv file, match codes and add field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344327#M174868</link>
    <description>&lt;P&gt;You can do it in query -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=event sourcetype=event_messages | lookup filename.csv EventCode as EventCode OUTPUT "Message Summary"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 24 Apr 2017 12:56:39 GMT</pubDate>
    <dc:creator>dineshraj9</dc:creator>
    <dc:date>2017-04-24T12:56:39Z</dc:date>
    <item>
      <title>Lookup csv file, match codes and add field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344326#M174867</link>
      <description>&lt;P&gt;I have a csv file containing 2 rows: EventCode and Message Summary&lt;BR /&gt;
Have added the CSV as a lookup file and I can also read the CSV from splunk (| inputlookup filename.csv)&lt;BR /&gt;
these are windows events,&lt;BR /&gt;
I want to compare the windows event id's from Splunk and match them with the csv file and add the field "message summary" &lt;BR /&gt;
the "message summary" give a short description of the event ID&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344326#M174867</guid>
      <dc:creator>erdalcan</dc:creator>
      <dc:date>2017-04-24T12:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup csv file, match codes and add field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344327#M174868</link>
      <description>&lt;P&gt;You can do it in query -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=event sourcetype=event_messages | lookup filename.csv EventCode as EventCode OUTPUT "Message Summary"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:56:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344327#M174868</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-04-24T12:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup csv file, match codes and add field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344328#M174869</link>
      <description>&lt;P&gt;I get this eroror &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'inputlookup' command: Invalid argument: 'EventCode' 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;did double check if the collum Event Code is parsed correctly from the CSV file and it is&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 13:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344328#M174869</guid>
      <dc:creator>erdalcan</dc:creator>
      <dc:date>2017-04-24T13:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup csv file, match codes and add field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344329#M174870</link>
      <description>&lt;P&gt;Check the field EventCode in your lookup and in the raw Splunk events. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| lookup filename.csv &amp;lt;lookup-field1&amp;gt; AS &amp;lt;event-field1&amp;gt; OUTPUT "Message Summary"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 13:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344329#M174870</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-04-24T13:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup csv file, match codes and add field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344330#M174871</link>
      <description>&lt;P&gt;Is there a space in one of the field names "Event Code" or are they both "EventCode"?  Watch your capitalization also.  Spelling needs to be exact.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 15:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344330#M174871</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-24T15:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup csv file, match codes and add field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344331#M174872</link>
      <description>&lt;P&gt;Let's assume that your sourcetype is &lt;CODE&gt;WinEventLog:Security&lt;/CODE&gt; and your lookup file is called &lt;CODE&gt;EventCode.csv&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;On your Search Head, navigate to the app that should own the lookup file and then do:&lt;BR /&gt;
&lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookups&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookup table files&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Choose File&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Save&lt;/CODE&gt;&lt;BR /&gt;
Then do: &lt;BR /&gt;
&lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookups&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookup definitions&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Name(="EventCode")&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookup file(="EventCode.csv")&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Save&lt;/CODE&gt;&lt;BR /&gt;
Then do:&lt;BR /&gt;
&lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookups&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Automatic lookups&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Name(=EventCodeAutoLookup)&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Apply to sourcetype named(="WinEventLog:Security")&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookup input fields(="EventCode")&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookup output fields(="message summary")' -&amp;gt;&lt;/CODE&gt;Save&lt;CODE&gt;&lt;BR /&gt;
Then do a&lt;/CODE&gt;debug/refresh` on the search head.&lt;/P&gt;

&lt;P&gt;No all events with a field &lt;CODE&gt;EventCode&lt;/CODE&gt; and &lt;CODE&gt;sourcetype&lt;/CODE&gt; of &lt;CODE&gt;WinEventLog:Security&lt;/CODE&gt; will automatically call lookup to get &lt;CODE&gt;message summary&lt;/CODE&gt; field values.  You can skip the last step and do it manually within the search by adding &lt;CODE&gt;| lookup EventCode EventCode OUTPUT "message summary"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 17:55:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-csv-file-match-codes-and-add-field/m-p/344331#M174872</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-24T17:55:06Z</dc:date>
    </item>
  </channel>
</rss>

