<?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 Check if domain is found in local lookup file containing over 10 000 entries in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Check-if-domain-is-found-in-local-lookup-file-containing-over-10/m-p/665674#M228383</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I been working on new rule and I just can't get it work fully. I know that there are many similar questions/answers on the forum related to this but none of them work for me.&lt;BR /&gt;&lt;BR /&gt;The events contain field "TargetUserOrGroupName" containing an email address e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TargetUserOrGroupName = testmail@gmail.com&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I use split and mvindex to get only email domain out of&amp;nbsp;TargetUserOrGroupName:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval email_domain = mvindex(split(TargetUserOrGroupName, "@"),1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Then I want to check if "email_domain" is in lookup "free_email_domains.csv"&lt;BR /&gt;&lt;BR /&gt;I was able to get this easily working (partial) with sub search and inputlookup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search email_domain=* [|inputlookup free_email_domains.csv.csv | fields email_domain]&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;But there is issue with getting all data as sub-search returns only 10 000 entries resulting in free email domains not being in first 10k rows are not matched.&lt;BR /&gt;&lt;BR /&gt;The local csv file contains only column email_domains (i did added "is_free_domain" column with value "Yes" in lookup while testing but it can be removed if not needed)&lt;BR /&gt;&lt;BR /&gt;Any help is welcome as I cant get lookup command to work (maybe due to additional extracting of field value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2023 13:15:55 GMT</pubDate>
    <dc:creator>licroBI_0x1</dc:creator>
    <dc:date>2023-10-20T13:15:55Z</dc:date>
    <item>
      <title>Check if domain is found in local lookup file containing over 10 000 entries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-domain-is-found-in-local-lookup-file-containing-over-10/m-p/665674#M228383</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I been working on new rule and I just can't get it work fully. I know that there are many similar questions/answers on the forum related to this but none of them work for me.&lt;BR /&gt;&lt;BR /&gt;The events contain field "TargetUserOrGroupName" containing an email address e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TargetUserOrGroupName = testmail@gmail.com&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I use split and mvindex to get only email domain out of&amp;nbsp;TargetUserOrGroupName:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval email_domain = mvindex(split(TargetUserOrGroupName, "@"),1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Then I want to check if "email_domain" is in lookup "free_email_domains.csv"&lt;BR /&gt;&lt;BR /&gt;I was able to get this easily working (partial) with sub search and inputlookup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search email_domain=* [|inputlookup free_email_domains.csv.csv | fields email_domain]&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;But there is issue with getting all data as sub-search returns only 10 000 entries resulting in free email domains not being in first 10k rows are not matched.&lt;BR /&gt;&lt;BR /&gt;The local csv file contains only column email_domains (i did added "is_free_domain" column with value "Yes" in lookup while testing but it can be removed if not needed)&lt;BR /&gt;&lt;BR /&gt;Any help is welcome as I cant get lookup command to work (maybe due to additional extracting of field value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 13:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-domain-is-found-in-local-lookup-file-containing-over-10/m-p/665674#M228383</guid>
      <dc:creator>licroBI_0x1</dc:creator>
      <dc:date>2023-10-20T13:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Check if domain is found in local lookup file containing over 10 000 entries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-domain-is-found-in-local-lookup-file-containing-over-10/m-p/665699#M228389</link>
      <description>&lt;P&gt;To determine if a given field value is in a lookup file, use the &lt;FONT face="courier new,courier"&gt;lookup&lt;/FONT&gt; command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval email_domain = mvindex(split(TargetUserOrGroupName, "@"),1)
| lookup free_email_domains.csv.csv email_domain OUTPUT is_free_domain
``` If email_domain is not in the lookup file then is_free_domain will be null ```
| where isnotnull(is_free_domain)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 15:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-domain-is-found-in-local-lookup-file-containing-over-10/m-p/665699#M228389</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-10-20T15:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Check if domain is found in local lookup file containing over 10 000 entries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-domain-is-found-in-local-lookup-file-containing-over-10/m-p/665830#M228451</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;richgalloway,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you for reply, I did try as you suggested with lookup command and it didn't work but....&lt;/P&gt;&lt;P&gt;Because of you response I went and tried it again, this time utilizing lower() option and finding it work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 10:14:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-domain-is-found-in-local-lookup-file-containing-over-10/m-p/665830#M228451</guid>
      <dc:creator>licroBI_0x1</dc:creator>
      <dc:date>2023-10-23T10:14:41Z</dc:date>
    </item>
  </channel>
</rss>

