<?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: add field from a lookup in an index search and displaying the result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605547#M210578</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247678"&gt;@darphboubou&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes, it's possible using the lookup command (&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.0/SearchReference/Lookup" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.0/SearchReference/Lookup&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;You need only to find the field in your search matching the computername field in the lookup, so if the fieldname in search is e.g. host and the field in lookup is computername, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| lookup your_lookup computername AS host OUTPUT OS
| table host OS&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2022 07:22:20 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-07-14T07:22:20Z</dc:date>
    <item>
      <title>How to add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605543#M210576</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I have a lookup on which we have two columns, one with the computer name and the other with the OS version.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;When I do a search in the windows index via splunk (event logs) I want to use this lookup to add the OS version in the result&lt;/P&gt;
&lt;P&gt;In fact, I want to display the information in my lookup in the result field of my index search.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Greetings&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 14:43:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605543#M210576</guid>
      <dc:creator>darphboubou</dc:creator>
      <dc:date>2022-07-14T14:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605547#M210578</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247678"&gt;@darphboubou&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes, it's possible using the lookup command (&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.0/SearchReference/Lookup" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.0/SearchReference/Lookup&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;You need only to find the field in your search matching the computername field in the lookup, so if the fieldname in search is e.g. host and the field in lookup is computername, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| lookup your_lookup computername AS host OUTPUT OS
| table host OS&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 07:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605547#M210578</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-14T07:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605552#M210579</link>
      <description>&lt;P&gt;Hi Giuseppe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstable thanks for your quick answer, I tried oyour solution but something works wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below the column in my lookup the two what I a interrested for (there is some more column in reality in my lookup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splookup.png" style="width: 768px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20514i05E6727D9B1E626A/image-size/large?v=v2&amp;amp;px=999" role="button" title="splookup.png" alt="splookup.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have a Server column and an OS column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to applicate what you explained to me (see print screen below) by renaming Server by Workstation_Name (the name of the fileld in the index search)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="resquest.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20515iDC8BC1B6C1D61CCE/image-size/large?v=v2&amp;amp;px=999" role="button" title="resquest.png" alt="resquest.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The return show a lot of workstations that doesn't belong to my lookup and the OS field stay empty.&lt;/P&gt;&lt;P&gt;Any other Idea ?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 08:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605552#M210579</guid>
      <dc:creator>darphboubou</dc:creator>
      <dc:date>2022-07-14T08:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605553#M210580</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247678"&gt;@darphboubou&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as you can see in the above link the syntax for the lookup command is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup_name key_field_in_lookup AS key_field_in_search OUTPUT fields_from_lookup&lt;/LI-CODE&gt;&lt;P&gt;if you don't see any value in the lookup fields,this means that there isn't any match between the key fields in lookup and search.&lt;/P&gt;&lt;P&gt;So, check at first the field names and then the field values.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 08:17:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605553#M210580</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-14T08:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605558#M210581</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see in the print screen below I have the column Server (key_field_in_lookup) an Workstation_Name (key_field_in_search)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lookup2.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20517iCE77D98970FBA6F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="lookup2.png" alt="lookup2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And as you can see this field exist in index.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="index2.png" style="width: 799px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20518i77AD66265CFD09D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="index2.png" alt="index2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't find out where I'm wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 08:55:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605558#M210581</guid>
      <dc:creator>darphboubou</dc:creator>
      <dc:date>2022-07-14T08:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605561#M210582</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247678"&gt;@darphboubou&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;check if there's a match between Server and&amp;nbsp;&lt;SPAN&gt;Workstation_Name values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;maybe there's some little difference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also try to converta both of them in lowercase or uppercase.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 10:20:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605561#M210582</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-14T10:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605570#M210586</link>
      <description>&lt;P&gt;My mistake, the request working. but the issue is that displaying the computer that are not in my lookupt too (see my print screen)&lt;/P&gt;&lt;P&gt;The two ones frame in green are in my lookup (and it's ok to display them) but the one named -ppd is not in my look up and i don't want it dispayed in the search result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="request2.png" style="width: 911px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20520iA4C78DACA2BC8C0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="request2.png" alt="request2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here my search request&lt;/P&gt;&lt;P&gt;index=windows EventCode=4624&lt;BR /&gt;| lookup damtest2.csv Server AS Workstation_Name OUTPUT os&lt;BR /&gt;| table Workstation_Name os Package_Name__NTLM_only_ | dedup Workstation_Name | sort Workstation_Name&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 11:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605570#M210586</guid>
      <dc:creator>darphboubou</dc:creator>
      <dc:date>2022-07-14T11:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605574#M210589</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247678"&gt;@darphboubou&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have two solutions: filter at the beggining (I hint because it's quicker!) or at the end.&lt;/P&gt;&lt;P&gt;at the beginning:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=windows EventCode=4624 [ | inputlookup damtest2.csv | rename Server AS Workstation_Name | fields Workstation_Name ]
| lookup damtest2.csv Server AS Workstation_Name OUTPUT os
| table Workstation_Name os Package_Name__NTLM_only_ 
| dedup Workstation_Name 
| sort Workstation_Name&lt;/LI-CODE&gt;&lt;P&gt;filtering at he end&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=windows EventCode=4624
| lookup damtest2.csv Server AS Workstation_Name OUTPUT os
| search os=*
| table Workstation_Name os Package_Name__NTLM_only_ 
| dedup Workstation_Name 
| sort Workstation_N&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 12:00:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605574#M210589</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-14T12:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605616#M210604</link>
      <description>&lt;P&gt;thanks for all &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution that you gave me works at the perfection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a good day&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 15:05:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605616#M210604</guid>
      <dc:creator>darphboubou</dc:creator>
      <dc:date>2022-07-14T15:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605618#M210606</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247678"&gt;@darphboubou&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 15:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605618#M210606</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-14T15:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: add field from a lookup in an index search and displaying the result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605948#M210712</link>
      <description>&lt;P&gt;done :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 09:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-field-from-a-lookup-in-an-index-search-and-displaying/m-p/605948#M210712</guid>
      <dc:creator>darphboubou</dc:creator>
      <dc:date>2022-07-18T09:05:41Z</dc:date>
    </item>
  </channel>
</rss>

