<?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 New lookup is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/New-lookup-is-not-working/m-p/558463#M158642</link>
    <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;I already worked with the lookup feature of splunk, tables, definitions and automatic lookup, and is working correctly even though I create a script to use the inputlook command to automatically update the lookup table when it is needed.&lt;/P&gt;&lt;P&gt;The csv file of the lookup table have the following structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;appid,appName
APP01729-af-ws.service,APP01729
APP01729-af-sch.service,APP01729
APP01729-af-wkr.service,APP01729&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea with this lookup is to match the appid with one of the attributes that splunk have from a seach and then add the value of appName in the result of that search, for example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;appid will match the values of systemd_unit&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;with that match in that search will add the attribute appname with the value of appName of the lookup table&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;That behavior is working with the values above, but when I try to create another lookup table and his definition with different values but matching the same attributes in splunk is not creating the new attribute in the search. I test that with this search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main_dev ...  
| spath systemd_unit 
| search systemd_unit="*container*"
| lookup appids_lookup appid as systemd_unit OUTPUTNEW appName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the systemd_unit that try to match is everything that have 'container' in his name and then create a new attribute called appName with the value corresponding to the value of appName in the lookup table&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;That doesn't work because the search for container and the corresponding lookup value in the lookup table is new.&lt;/P&gt;&lt;P&gt;But the old values of the lookup table, I mean old values with values from other lookup tables that I use in the new lookup table it works correctly, creating the new attribute in the seach.&lt;/P&gt;&lt;P&gt;My problem is do I need something else to do more than creating the lookup table, definition to make this works for new values?&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 18:50:46 GMT</pubDate>
    <dc:creator>gustavoortega</dc:creator>
    <dc:date>2021-07-06T18:50:46Z</dc:date>
    <item>
      <title>New lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/New-lookup-is-not-working/m-p/558463#M158642</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;I already worked with the lookup feature of splunk, tables, definitions and automatic lookup, and is working correctly even though I create a script to use the inputlook command to automatically update the lookup table when it is needed.&lt;/P&gt;&lt;P&gt;The csv file of the lookup table have the following structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;appid,appName
APP01729-af-ws.service,APP01729
APP01729-af-sch.service,APP01729
APP01729-af-wkr.service,APP01729&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea with this lookup is to match the appid with one of the attributes that splunk have from a seach and then add the value of appName in the result of that search, for example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;appid will match the values of systemd_unit&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;with that match in that search will add the attribute appname with the value of appName of the lookup table&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;That behavior is working with the values above, but when I try to create another lookup table and his definition with different values but matching the same attributes in splunk is not creating the new attribute in the search. I test that with this search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main_dev ...  
| spath systemd_unit 
| search systemd_unit="*container*"
| lookup appids_lookup appid as systemd_unit OUTPUTNEW appName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the systemd_unit that try to match is everything that have 'container' in his name and then create a new attribute called appName with the value corresponding to the value of appName in the lookup table&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;That doesn't work because the search for container and the corresponding lookup value in the lookup table is new.&lt;/P&gt;&lt;P&gt;But the old values of the lookup table, I mean old values with values from other lookup tables that I use in the new lookup table it works correctly, creating the new attribute in the seach.&lt;/P&gt;&lt;P&gt;My problem is do I need something else to do more than creating the lookup table, definition to make this works for new values?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 18:50:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/New-lookup-is-not-working/m-p/558463#M158642</guid>
      <dc:creator>gustavoortega</dc:creator>
      <dc:date>2021-07-06T18:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: New lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/New-lookup-is-not-working/m-p/558490#M158651</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236117"&gt;@gustavoortega&lt;/a&gt;&amp;nbsp; have you tried finding the new lookup table with | inputlookup command?&lt;/P&gt;&lt;P&gt;Can you share the new lookup table contents and does your search events having field/value that matches with lookup field?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you created new lookup what is the scope of app? are you running the query in same app or outside?&lt;/P&gt;&lt;P&gt;what is the new search query that you have used?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 00:09:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/New-lookup-is-not-working/m-p/558490#M158651</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-07T00:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: New lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/New-lookup-is-not-working/m-p/558562#M158670</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt;&amp;nbsp;&amp;nbsp;Yes the command and the output of the | inputlookup is the next:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gustavoortega_0-1625664287965.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14968iD393A97D96EACBB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gustavoortega_0-1625664287965.png" alt="gustavoortega_0-1625664287965.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;This is the lookup table and the search to generate it&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gustavoortega_1-1625664373986.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14969i5DAF5CF9BDFF5C1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gustavoortega_1-1625664373986.png" alt="gustavoortega_1-1625664373986.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I'm running the lookup in the same scope and in the same app&lt;BR /&gt;This is the lookup definition&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gustavoortega_2-1625664422655.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14970i2712A8808EF126F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gustavoortega_2-1625664422655.png" alt="gustavoortega_2-1625664422655.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And this is the lookup table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gustavoortega_3-1625664484178.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14971i2DB75B11A6968432/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gustavoortega_3-1625664484178.png" alt="gustavoortega_3-1625664484178.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And this is the new search that I'm using&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gustavoortega_4-1625664609347.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14972iB6EDAA36B7C8AEDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gustavoortega_4-1625664609347.png" alt="gustavoortega_4-1625664609347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As you can see I try t match the values of appid in the lookup table to systemd_unit in the search, and the values are matching for&amp;nbsp;&lt;SPAN&gt;containerd.service but the new value that should show in appName doesn't show&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But if I change the search a little to include another value, not just containerd it works correctly, but only shows the other value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gustavoortega_5-1625664828425.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14973iB5F2AB779E277970/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gustavoortega_5-1625664828425.png" alt="gustavoortega_5-1625664828425.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think this other value is correctly retrieved because is a value that exists for the other lookups that works correctly&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:35:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/New-lookup-is-not-working/m-p/558562#M158670</guid>
      <dc:creator>gustavoortega</dc:creator>
      <dc:date>2021-07-07T13:35:57Z</dc:date>
    </item>
  </channel>
</rss>

