<?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: How to whitelist combination of fields using lookup table? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409440#M94084</link>
    <description>&lt;P&gt;what does your whitelist.csv look like?&lt;/P&gt;

&lt;P&gt;Typically, you would just use the &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.0/SearchReference/Lookup" target="_blank"&gt;lookup command&lt;/A&gt; (not inputlookup) to lookup fields from your events in the table then output something that would indicate it's whitelisted. &lt;/P&gt;

&lt;P&gt;For example let's say your lookup has two fields:  host, service.  And maybe your events have fields call host_name and service_name.  Then maybe something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=winevents sourcetype="WinEventLog:System" EventCode=7045
| lookup whitelist.csv host AS host_name, service AS service_name OUTPUT host AS found_host
| where isnull(found_host)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:34:07 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2020-09-29T21:34:07Z</dc:date>
    <item>
      <title>How to whitelist combination of fields using lookup table?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409439#M94083</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;

&lt;P&gt;We've got an alert which gets triggered if service is installed on the windows host.&lt;/P&gt;

&lt;P&gt;index=winevents sourcetype="WinEventLog:System" EventCode=7045&lt;/P&gt;

&lt;P&gt;We want to whitelist combination of service and host. For example if service A is installed on host A then it should be fine. Eventually, list of host-service would grow so we would like to use lookup table.&lt;/P&gt;

&lt;P&gt;We have whitelisted single field (src in below example) by creating the lookup table and adding below line in the condition and it works perfectly alright.&lt;/P&gt;

&lt;P&gt;| join type=left src [ | inputlookup whitelist.csv | search search_name=my search name exclusion_field=src | rename exclusion_value AS src | eval whitelisted="true"]&lt;/P&gt;

&lt;P&gt;| where NOT whitelisted="true"&lt;/P&gt;

&lt;P&gt;I tried adding multiple fields in above line but doesn't seem to be working.&lt;/P&gt;

&lt;P&gt;What is the best way to address the requirement? &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:30:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409439#M94083</guid>
      <dc:creator>utsav45</dc:creator>
      <dc:date>2020-09-29T21:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to whitelist combination of fields using lookup table?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409440#M94084</link>
      <description>&lt;P&gt;what does your whitelist.csv look like?&lt;/P&gt;

&lt;P&gt;Typically, you would just use the &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.0/SearchReference/Lookup" target="_blank"&gt;lookup command&lt;/A&gt; (not inputlookup) to lookup fields from your events in the table then output something that would indicate it's whitelisted. &lt;/P&gt;

&lt;P&gt;For example let's say your lookup has two fields:  host, service.  And maybe your events have fields call host_name and service_name.  Then maybe something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=winevents sourcetype="WinEventLog:System" EventCode=7045
| lookup whitelist.csv host AS host_name, service AS service_name OUTPUT host AS found_host
| where isnull(found_host)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:34:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409440#M94084</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2020-09-29T21:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to whitelist combination of fields using lookup table?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409441#M94085</link>
      <description>&lt;P&gt;Hi Mate,&lt;/P&gt;

&lt;P&gt;Thanks for your reply.&lt;/P&gt;

&lt;P&gt;I tried to use lookup command instead of inputlookup and surprisingly it gives me an error "Error in 'lookup' command: Lookups: The lookup table 'utsavtest.csv' does not exist or is not available."&lt;/P&gt;

&lt;P&gt;When I try to use the same lookup table using inputlookup command (the one I mentioned previously) then it doesn't provide the error.&lt;/P&gt;

&lt;P&gt;I believe permissions should work the same for both the commands. Not sure &lt;/P&gt;

&lt;P&gt;I've attached screenshots of lookup table, error while running splunk search and lookup table permissions on below one drive URL.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://1drv.ms/f/s!AiXjrqpclQ-Jhv9IYuH0Y8epDjkF7Q" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 02:18:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409441#M94085</guid>
      <dc:creator>utsav45</dc:creator>
      <dc:date>2018-10-09T02:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to whitelist combination of fields using lookup table?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409442#M94086</link>
      <description>&lt;P&gt;interesting.  I think you can do lookups against the csv directly, but maybe try creating a lookup definition to that csv to see if that works.  Settings -&amp;gt; Lookups - &amp;gt; Lookup Definitions.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 13:51:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409442#M94086</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2018-10-09T13:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to whitelist combination of fields using lookup table?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409443#M94087</link>
      <description>&lt;P&gt;Thanks Mate,&lt;/P&gt;

&lt;P&gt;I had to add lookup definitions for newly created lookup table. After which I was able to achieve the requirement using the query you suggested.&lt;/P&gt;

&lt;P&gt;Thanks heaps!!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 00:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409443#M94087</guid>
      <dc:creator>utsav45</dc:creator>
      <dc:date>2018-10-15T00:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to whitelist combination of fields using lookup table?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409444#M94088</link>
      <description>&lt;P&gt;glad it's working!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 11:02:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-whitelist-combination-of-fields-using-lookup-table/m-p/409444#M94088</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2018-10-15T11:02:35Z</dc:date>
    </item>
  </channel>
</rss>

