<?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 How to display matching  lookup definitions in a search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-matching-lookup-definitions-in-a-search/m-p/52003#M12634</link>
    <description>&lt;P&gt;Is there a way to display lookup definition name or lookup table file name that contains matching value in a search?&lt;BR /&gt;
Example of query:&lt;BR /&gt;
source=syslog | dedup src,dst | lookup listA ip_address as dst OUTPUTNEW |  lookup listB ip_address as dst OUTPUTNEW | where isbad="true" | table device, src, dst&lt;/P&gt;

&lt;P&gt;Expected result:&lt;BR /&gt;
device src dst listA&lt;BR /&gt;
device src dst listB&lt;BR /&gt;
device src dst listA&lt;BR /&gt;
device src dst listA&lt;BR /&gt;
...etc&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:26:38 GMT</pubDate>
    <dc:creator>thipsz</dc:creator>
    <dc:date>2020-09-28T13:26:38Z</dc:date>
    <item>
      <title>How to display matching  lookup definitions in a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-matching-lookup-definitions-in-a-search/m-p/52003#M12634</link>
      <description>&lt;P&gt;Is there a way to display lookup definition name or lookup table file name that contains matching value in a search?&lt;BR /&gt;
Example of query:&lt;BR /&gt;
source=syslog | dedup src,dst | lookup listA ip_address as dst OUTPUTNEW |  lookup listB ip_address as dst OUTPUTNEW | where isbad="true" | table device, src, dst&lt;/P&gt;

&lt;P&gt;Expected result:&lt;BR /&gt;
device src dst listA&lt;BR /&gt;
device src dst listB&lt;BR /&gt;
device src dst listA&lt;BR /&gt;
device src dst listA&lt;BR /&gt;
...etc&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:26:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-matching-lookup-definitions-in-a-search/m-p/52003#M12634</guid>
      <dc:creator>thipsz</dc:creator>
      <dc:date>2020-09-28T13:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to display matching  lookup definitions in a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-matching-lookup-definitions-in-a-search/m-p/52004#M12635</link>
      <description>&lt;P&gt;The only way I can think of to do this, is to add a column to each list. For example:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;listA.csv&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;ip_address,device,listNameA&lt;BR /&gt;
192.188.17.252,xyz,listA&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;listB.csv&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;ip_address,isBad,listNameB&lt;BR /&gt;
192.188.17.252,true,listB&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Then your search would be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=syslog | dedup src,dst 
| lookup listA ip_address as dst OUTPUTNEW
| lookup listB ip_address as dst OUTPUTNEW 
| where isbad="true" 
| eval listName = listNameA + listNameB
| table device, src, dst, listName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Notice if both lookups work, you could get a listName output that is &lt;CODE&gt;listAlistB&lt;/CODE&gt;. And of course, I am completely making up where the fields are stored in the lookup tables...&lt;/P&gt;

&lt;P&gt;More info would help make a better answer.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2013 09:44:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-matching-lookup-definitions-in-a-search/m-p/52004#M12635</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-03-06T09:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to display matching  lookup definitions in a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-matching-lookup-definitions-in-a-search/m-p/52005#M12636</link>
      <description>&lt;P&gt;syslog contains src and dst fields with IP address as value. The goal is to identify src that talks to dst matching any of the IPs in the two lists. The query works as intended, but it would be also nice to know which list contains matching dst IP.&lt;BR /&gt;
This is being taken from getwatchlist app.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2013 18:40:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-matching-lookup-definitions-in-a-search/m-p/52005#M12636</guid>
      <dc:creator>thipsz</dc:creator>
      <dc:date>2013-03-06T18:40:39Z</dc:date>
    </item>
  </channel>
</rss>

