<?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 Search a lookup with wildcard in values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/579300#M201871</link>
    <description>&lt;P class=""&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am stuck implementing below use case , please help me on this :&lt;BR /&gt;&lt;BR /&gt;I have a lookup say url_requested.csv.&amp;nbsp;&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;http_url&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;host&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;*002redir023.dns04*&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;test&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;*yahoo*&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;test&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&lt;BR /&gt;Another csv file :&amp;nbsp; malicious.csv&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;url&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;Description&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;xyzsaas.com&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;C&amp;amp;C&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;&lt;A href="http://002redir023.dns04.com" target="_blank" rel="noopener"&gt;http://002redir023.dns04.com&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;malicious&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&lt;BR /&gt;I have to check the url values in "url_requested.csv" with that in "malicious.csv" and get only those &lt;STRONG&gt;url&lt;/STRONG&gt; and &lt;STRONG&gt;description&lt;/STRONG&gt; which has a match in&amp;nbsp;"malicious.csv" . url_requested.csv lookup has url column with wildcard prefixed and suffixed.&lt;BR /&gt;&lt;BR /&gt;I have added the wildcard configuration in transforms.conf following this :&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94513" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94513&lt;/A&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94513" target="_blank" rel="noopener"&gt;. &lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;My query :&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;| inputlookup malicious.csv&lt;BR /&gt;| table url description&lt;BR /&gt;| lookup url_requested.csv&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;http_url as url outputnew host&lt;BR /&gt;| search host=*&lt;BR /&gt;| fields - host&lt;SPAN class=""&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;I am getting no results running this query. Please let me know where I am going wrong and help me with the solution.&lt;BR /&gt;&lt;BR /&gt;Result I am looking for :&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;url&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;Description&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;&lt;A href="http://002redir023.dns04.com" target="_blank" rel="noopener"&gt;http://002redir023.dns04.com&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;malicious&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Mon, 27 Dec 2021 11:38:40 GMT</pubDate>
    <dc:creator>Poojitha</dc:creator>
    <dc:date>2021-12-27T11:38:40Z</dc:date>
    <item>
      <title>Search a lookup with wildcard in values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/579300#M201871</link>
      <description>&lt;P class=""&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am stuck implementing below use case , please help me on this :&lt;BR /&gt;&lt;BR /&gt;I have a lookup say url_requested.csv.&amp;nbsp;&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;http_url&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;host&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;*002redir023.dns04*&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;test&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;*yahoo*&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;test&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&lt;BR /&gt;Another csv file :&amp;nbsp; malicious.csv&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;url&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;Description&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;xyzsaas.com&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;C&amp;amp;C&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;&lt;A href="http://002redir023.dns04.com" target="_blank" rel="noopener"&gt;http://002redir023.dns04.com&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;malicious&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&lt;BR /&gt;I have to check the url values in "url_requested.csv" with that in "malicious.csv" and get only those &lt;STRONG&gt;url&lt;/STRONG&gt; and &lt;STRONG&gt;description&lt;/STRONG&gt; which has a match in&amp;nbsp;"malicious.csv" . url_requested.csv lookup has url column with wildcard prefixed and suffixed.&lt;BR /&gt;&lt;BR /&gt;I have added the wildcard configuration in transforms.conf following this :&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94513" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94513&lt;/A&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Can-we-use-wildcard-characters-in-a-lookup-table/m-p/94513" target="_blank" rel="noopener"&gt;. &lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;My query :&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;| inputlookup malicious.csv&lt;BR /&gt;| table url description&lt;BR /&gt;| lookup url_requested.csv&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;http_url as url outputnew host&lt;BR /&gt;| search host=*&lt;BR /&gt;| fields - host&lt;SPAN class=""&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;I am getting no results running this query. Please let me know where I am going wrong and help me with the solution.&lt;BR /&gt;&lt;BR /&gt;Result I am looking for :&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;url&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;Description&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class=""&gt;&lt;A href="http://002redir023.dns04.com" target="_blank" rel="noopener"&gt;http://002redir023.dns04.com&lt;/A&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class=""&gt;malicious&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 27 Dec 2021 11:38:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/579300#M201871</guid>
      <dc:creator>Poojitha</dc:creator>
      <dc:date>2021-12-27T11:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Search a lookup with wildcard in values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/579330#M201877</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241735"&gt;@Poojitha&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use inputlookup in a subsearch to filter search results using field-value pairs:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| inputlookup malicious.csv
| table url description
| search [| inputlookup url_requested.csv | table http_url | rename http_url as url ]&lt;/LI-CODE&gt;&lt;P&gt;Since your values contain wildcards, the resulting search becomes e.g.:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| inputlookup malicious.csv
| table url description
| search ( ( url=*002redir023.dns04* ) OR (url=*yahoo*) )&lt;/LI-CODE&gt;&lt;P&gt;You can optimize this into your initial lookup:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| inputlookup malicious.csv where [| inputlookup url_requested.csv | table http_url | rename http_url as url ]
| table url description&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Dec 2021 16:22:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/579330#M201877</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2021-12-27T16:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Search a lookup with wildcard in values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/579627#M201968</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49493"&gt;@tscroggins&lt;/a&gt;&amp;nbsp; Thanks for helping me with the answer&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thumbs up !&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 19:07:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/579627#M201968</guid>
      <dc:creator>Poojitha</dc:creator>
      <dc:date>2021-12-30T19:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search a lookup with wildcard in values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/580950#M202395</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49493"&gt;@tscroggins&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What if there are more columns in&amp;nbsp;&lt;SPAN&gt;url_requested.csv&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;example :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;http_url&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;host&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;source_ip&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;source_port&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;destip&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;destport&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;useragent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;&lt;SPAN&gt;*yahoo*&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;test&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;100.1.1.1&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;6767&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;101.1.1.1&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;80&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;chrome&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;&lt;SPAN&gt;*002redir023.dns04*&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;test&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;100.2.2.2&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;8787&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;102.1.1.1&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;80&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;chrome&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&lt;BR /&gt;I have to get all columns in&amp;nbsp;&lt;SPAN&gt;url_requested.csv&amp;nbsp; when there is a match in malicious.csv. I am newbie to splunk. I tried with append as well as with the above approach you gave, still not getting expected result &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Result I am looking for :&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;url&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;description&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;sourceip&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;sourceport&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;destip&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;destport&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;useragent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;&lt;A href="http://002redir023.dns04.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;http://002redir023.dns04.com&lt;/A&gt;&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;malicious&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;100.2.2.2&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;8787&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;102.1.1.1&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;80&lt;/TD&gt;&lt;TD width="14.285714285714286%" height="25px"&gt;chrome&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;Please help me !&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 14:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-a-lookup-with-wildcard-in-values/m-p/580950#M202395</guid>
      <dc:creator>Poojitha</dc:creator>
      <dc:date>2022-01-13T14:00:02Z</dc:date>
    </item>
  </channel>
</rss>

