<?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 Lookup stating that it cannot find all specified lookup fields in the lookup table. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371806#M109405</link>
    <description>&lt;P&gt;I am attempting to find first time logons to new servers.  I am trying to use a lookup to list a EventID Description rather than just the code.  I keep getting an error stating "Error in 'lookup' command: Could not find all of the specified lookup fields in the lookup table"&lt;BR /&gt;
Any Idea what I have wrong?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype="*WinEventLog:Security" 
|lookup windows_event_lookup.csv EventCode AS EventID OUTPUT Event_Desc
| search (4624 OR 4647 OR 4648 OR 551 OR 552 OR 540 OR 528 OR 4768 OR 4769 OR 4770 OR 4771 OR 4768 OR 4774 OR 4776 OR 4778 OR 4779 OR 672 OR 673 OR 674 OR 675 OR 678 OR 680 OR 682 OR 683)  (EventCode=4624 OR EventCode=4647 OR EventCode=4648 OR EventCode=551 OR EventCode=552 OR EventCode=540 OR EventCode=528 OR EventCode=4768 OR EventCode=4769 OR EventCode=4770 OR EventCode=4771 OR EventCode=4768 OR EventCode=4774 OR EventCode=4776 OR EventCode=4778 OR EventCode=4779 OR EventCode=672 OR EventCode=673 OR EventCode=674 OR EventCode=675 OR EventCode=678 OR EventCode=680 OR EventCode=682 OR EventCode=683)
| table user Event_Desc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Apr 2018 19:23:32 GMT</pubDate>
    <dc:creator>aarontmartin165</dc:creator>
    <dc:date>2018-04-30T19:23:32Z</dc:date>
    <item>
      <title>Lookup stating that it cannot find all specified lookup fields in the lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371806#M109405</link>
      <description>&lt;P&gt;I am attempting to find first time logons to new servers.  I am trying to use a lookup to list a EventID Description rather than just the code.  I keep getting an error stating "Error in 'lookup' command: Could not find all of the specified lookup fields in the lookup table"&lt;BR /&gt;
Any Idea what I have wrong?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype="*WinEventLog:Security" 
|lookup windows_event_lookup.csv EventCode AS EventID OUTPUT Event_Desc
| search (4624 OR 4647 OR 4648 OR 551 OR 552 OR 540 OR 528 OR 4768 OR 4769 OR 4770 OR 4771 OR 4768 OR 4774 OR 4776 OR 4778 OR 4779 OR 672 OR 673 OR 674 OR 675 OR 678 OR 680 OR 682 OR 683)  (EventCode=4624 OR EventCode=4647 OR EventCode=4648 OR EventCode=551 OR EventCode=552 OR EventCode=540 OR EventCode=528 OR EventCode=4768 OR EventCode=4769 OR EventCode=4770 OR EventCode=4771 OR EventCode=4768 OR EventCode=4774 OR EventCode=4776 OR EventCode=4778 OR EventCode=4779 OR EventCode=672 OR EventCode=673 OR EventCode=674 OR EventCode=675 OR EventCode=678 OR EventCode=680 OR EventCode=682 OR EventCode=683)
| table user Event_Desc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Apr 2018 19:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371806#M109405</guid>
      <dc:creator>aarontmartin165</dc:creator>
      <dc:date>2018-04-30T19:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup stating that it cannot find all specified lookup fields in the lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371807#M109406</link>
      <description>&lt;P&gt;The lookup table windows_event_lookup.csv contains the field EventCode and Event_Desc??&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:19:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371807#M109406</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T19:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup stating that it cannot find all specified lookup fields in the lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371808#M109407</link>
      <description>&lt;P&gt;And shouldnt he be doing | search EventID= rather than EventCode=&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 21:24:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371808#M109407</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-04-30T21:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup stating that it cannot find all specified lookup fields in the lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371809#M109408</link>
      <description>&lt;P&gt;yes if his lookup command is correct.. it seems like the order of fields in input part of lookup (after lookup name and before OUTPUT) is reversed, hence Splunk can't find the field EventCode (which is available in indexed data) in the lookup table. Try reversing it.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 21:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371809#M109408</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-04-30T21:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup stating that it cannot find all specified lookup fields in the lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371810#M109409</link>
      <description>&lt;P&gt;Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | lookup windows_event_lookup.csv EventID AS EventCode OUTPUT Event_Desc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I always have to look up the syntax for that one.  This assumes that EventCode is the name in the event, and EventID is the field name in the lookup table. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | lookup &amp;lt;lookup-table-name&amp;gt; &amp;lt;lookup-field1&amp;gt; AS &amp;lt;event-field1&amp;gt;,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;from &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.3/SearchReference/Lookup"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.3/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 21:44:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371810#M109409</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-04-30T21:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup stating that it cannot find all specified lookup fields in the lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371811#M109410</link>
      <description>&lt;P&gt;Your search should most likely look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=* sourcetype="*WinEventLog:Security" (4624 OR 4647 OR 4648 OR 551 OR 552 OR 540 OR 528 OR 4768 OR 4769 OR 4770 OR 4771 OR 4768 OR 4774 OR 4776 OR 4778 OR 4779 OR 672 OR 673 OR 674 OR 675 OR 678 OR 680 OR 682 OR 683)  (EventCode=4624 OR EventCode=4647 OR EventCode=4648 OR EventCode=551 OR EventCode=552 OR EventCode=540 OR EventCode=528 OR EventCode=4768 OR EventCode=4769 OR EventCode=4770 OR EventCode=4771 OR EventCode=4768 OR EventCode=4774 OR EventCode=4776 OR EventCode=4778 OR EventCode=4779 OR EventCode=672 OR EventCode=673 OR EventCode=674 OR EventCode=675 OR EventCode=678 OR EventCode=680 OR EventCode=682 OR EventCode=683)
 | lookup windows_event_lookup.csv EventID AS EventCode OUTPUT Event_Desc
 | table user Event_Desc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Putting the search parameters in the first line will make Splunk fetch only those relevant events from the beginning, and also only do the lookup on those events instead of all events. Twice the performance improvement.&lt;/P&gt;

&lt;P&gt;The thing about EventCode/EventID being twisted has already been said by others. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 21:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371811#M109410</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-04-30T21:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup stating that it cannot find all specified lookup fields in the lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371812#M109411</link>
      <description>&lt;P&gt;Only one set should be present -- either the first set of &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(4624 OR 4647... )  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or the second set of&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (EventCode=4624 OR EventCode=4647 ... ) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If anything in the second set is true, the same item in the first set will be true.  &lt;/P&gt;

&lt;P&gt;Use the second set, with the name of the field as it is on the events.  &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;The first method could be used if the code was present, but had to be extracted via a regular expression after the events have been brought back.  That test will limit the events to those that contain one of the numbers, for example 4624, in any field in the event.  (ie address="4624 first street, springfield")  &lt;/P&gt;

&lt;P&gt;You would then, immediately after the extraction, use a &lt;CODE&gt;search&lt;/CODE&gt; or &lt;CODE&gt;where&lt;/CODE&gt; to get rid of any events where the number had been found in the wrong field.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 23:03:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371812#M109411</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-04-30T23:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup stating that it cannot find all specified lookup fields in the lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371813#M109412</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I'm having a little twisted requirement than your's. Hoping if someone can help me with it.&lt;BR /&gt;
We have different arrival times of multiple files that gets created at a common location. &lt;BR /&gt;
I've created a csv lookup file xyz.csv which has the following rows in it inside splunk.&lt;BR /&gt;
file_Name:      extension_of_the_File:   file_id:    file_Starting_Name:&lt;BR /&gt;
1 a                         tg                                                       a&lt;BR /&gt;
2 b                         tg                                                       b&lt;BR /&gt;
3 c                         tg                                                       c&lt;BR /&gt;
4 d                         tg                                                       d&lt;BR /&gt;
I want to see all the result and if  files a,b is not received by x specific time and c,d is not received by Y specific time. I want to generate alert based on this query which will tell me at this time of the day or hour the file was not received. &lt;/P&gt;

&lt;P&gt;My base query looks like this:&lt;BR /&gt;
| inputlookup xyz.csv  | join type=outer file_Starting_Name [ search index=index sourcetype=logs &lt;BR /&gt;
 /busdata/etc/host/logs/*.tg &lt;BR /&gt;
 | rex field=&lt;EM&gt;raw "/(?[\w&lt;/EM&gt;]+).flg" | rename fileName as file_Starting_Name &lt;BR /&gt;
    | stats latest(_time) as time by file_Starting_Name, host]&lt;/P&gt;

&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:52:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-stating-that-it-cannot-find-all-specified-lookup-fields/m-p/371813#M109412</guid>
      <dc:creator>splunking1t</dc:creator>
      <dc:date>2020-09-29T19:52:13Z</dc:date>
    </item>
  </channel>
</rss>

