<?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: Search using a set of values. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613659#M213277</link>
    <description>&lt;P&gt;Two ways to do this - the choice will depend on data volume, field cardinality. They are&lt;/P&gt;&lt;P&gt;1. Filter with subsearch&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search [
  | inputlookup your_lookup.csv 
  | fields application_name
  | rename application_name as processName ]&lt;/LI-CODE&gt;&lt;P&gt;this will filter the raw data that comes from the index to only those processName values that match the application_name from the lookup. If the lookup is large then this may be slower as first the subsearch runs and then the data returned is added as a constraint (A=1 OR A=2 OR A=3) etc to the outer search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Using a lookup&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search 
| lookup your_lookup.csv application_name as processName OUTPUT processName as foundProcessName
| where isnotnull(foundProcessName)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;this pulls all the data from the index and then lookup up the application_name. The OUTPUT will create a new field 'foundProcessName' if the processName exists in the lookup, so then isnotnull will filter out only those found.&lt;/P&gt;&lt;P&gt;Performance will vary between the two, so look at the job inspector to see which one is the right one for your data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2022 23:48:12 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-09-19T23:48:12Z</dc:date>
    <item>
      <title>How to search using a set of values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613653#M213273</link>
      <description>&lt;P&gt;Hello All,&lt;BR /&gt;&lt;BR /&gt;I am relatively new to splunk and I am trying to search using sets. Sets here refers to a group of values that I import into splunk and then search the logs from a data source for values that match any of the values in the set. Something like a reference set in Qradar.&lt;/P&gt;
&lt;P&gt;The usecase I am trying to implement is an alert for blacklisted applications. I have a .csv file that contains two columns, &lt;STRONG&gt;application name&lt;/STRONG&gt; &amp;amp;&lt;STRONG&gt; application category&lt;/STRONG&gt;. I want to import this data into Splunk and then use the values in the &lt;STRONG&gt;application name&lt;/STRONG&gt; column to search against the &lt;STRONG&gt;processName&lt;/STRONG&gt; field of the logs from the endpoint security solution.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How do I achieve this on Splunk? I have read through the documentation for lookup but I did not understand how it would help me achieve my objective.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 14:36:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613653#M213273</guid>
      <dc:creator>olawalePS</dc:creator>
      <dc:date>2022-09-20T14:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Search using a set of values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613659#M213277</link>
      <description>&lt;P&gt;Two ways to do this - the choice will depend on data volume, field cardinality. They are&lt;/P&gt;&lt;P&gt;1. Filter with subsearch&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search [
  | inputlookup your_lookup.csv 
  | fields application_name
  | rename application_name as processName ]&lt;/LI-CODE&gt;&lt;P&gt;this will filter the raw data that comes from the index to only those processName values that match the application_name from the lookup. If the lookup is large then this may be slower as first the subsearch runs and then the data returned is added as a constraint (A=1 OR A=2 OR A=3) etc to the outer search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Using a lookup&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search 
| lookup your_lookup.csv application_name as processName OUTPUT processName as foundProcessName
| where isnotnull(foundProcessName)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;this pulls all the data from the index and then lookup up the application_name. The OUTPUT will create a new field 'foundProcessName' if the processName exists in the lookup, so then isnotnull will filter out only those found.&lt;/P&gt;&lt;P&gt;Performance will vary between the two, so look at the job inspector to see which one is the right one for your data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 23:48:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613659#M213277</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-09-19T23:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Search using a set of values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613762#M213310</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-09-20 at 10.34.14.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21555i3E9F492633A8EB06/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-09-20 at 10.34.14.png" alt="Screen Shot 2022-09-20 at 10.34.14.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-09-20 at 12.32.43.png" style="width: 408px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21556iFE8FBA8859694E3A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-09-20 at 12.32.43.png" alt="Screen Shot 2022-09-20 at 12.32.43.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;I still do not understand how to run the search, The images above are a sample log from the EDR and the csv table. I want a search that will use wildcards to check if the process_cmdline value in the EDR logs matches any of the values in the application name column of the csv. &amp;nbsp;I can then save it as an alert to notify me if a user has one of those applications running.&lt;BR /&gt;&lt;BR /&gt;will the search query you provided achieve that?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 12:22:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613762#M213310</guid>
      <dc:creator>olawalePS</dc:creator>
      <dc:date>2022-09-20T12:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search using a set of values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613858#M213326</link>
      <description>&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;However, if you need to handle wildcards in the lookup, then you will need to make a "lookup definition" that is based on your lookup file.csv. In that definition, advanced properties, set the match type to WILDCARD(ApplicationName).&amp;nbsp; I&amp;nbsp;would suggest that you remove spaces from the field names to make this easier to do.&lt;/P&gt;&lt;P&gt;Then you will also need to add a leading and trailing * character to each of the application names, so the lookup can work as wildcard.&lt;/P&gt;&lt;P&gt;Then either of the solutions I gave should work - removing spaces from the field names will make life easier in general.&lt;/P&gt;&lt;P&gt;Try the options and let me know how it goes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 22:58:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-set-of-values/m-p/613858#M213326</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-09-20T22:58:01Z</dc:date>
    </item>
  </channel>
</rss>

