<?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 use lookup to exclude a list of user_names and service_file_names in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81136#M20517</link>
    <description>&lt;P&gt;Ayn - I probably should have bolded out the search that I was trying to use so that it was a little more clear and stood out. The search that I started out with is mentioned above for you to review, in my original post. Thanks for taking the time to try and help me.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2013 20:19:18 GMT</pubDate>
    <dc:creator>Darksynergy</dc:creator>
    <dc:date>2013-07-01T20:19:18Z</dc:date>
    <item>
      <title>How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81131#M20512</link>
      <description>&lt;P&gt;I am trying to run a search that shows executibles that are run by any user on my network. Yet I want to exclude the search with typically run service .exe's and assocuated service user accounts. I have searched throughout the Splunk website and have done a fair amount of googling on how this can be done but had no success in my search. I have added what I have been trying to achieve below.&lt;/P&gt;

&lt;P&gt;Can anyone help me figure out how to achieve this?&lt;/P&gt;

&lt;P&gt;*.exe  NOT ("Specific-Service-Account") NOT ("Specific-Service-Account1") NOT ("dsmod.exe") NOT $ NOT [| inputlookup ExclusionList.csv | ("User_Name") OR ("Image_File_Name")] | stats count by User_Name, Image_File_Name, host | sort count desc&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:13:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81131#M20512</guid>
      <dc:creator>Darksynergy</dc:creator>
      <dc:date>2020-09-28T14:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81132#M20513</link>
      <description>&lt;P&gt;Could you try this&lt;/P&gt;

&lt;P&gt;your search query|where NOT [|inputcsv file.csv]&lt;/P&gt;

&lt;P&gt;in file.csv contains User_Name,Image_File_Name list. Please give it a try.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:13:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81132#M20513</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T14:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81133#M20514</link>
      <description>&lt;P&gt;Better yet, don't use the &lt;CODE&gt;where&lt;/CODE&gt; statement.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yoursearch&amp;gt; NOT [|inputlookup ExclusionList.csv]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Jul 2013 19:38:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81133#M20514</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-07-01T19:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81134#M20515</link>
      <description>&lt;P&gt;Thank you both for your suggestions. I tried both and now seem to be getting an "unbalanced quote" error.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 19:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81134#M20515</guid>
      <dc:creator>Darksynergy</dc:creator>
      <dc:date>2013-07-01T19:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81135#M20516</link>
      <description>&lt;P&gt;What does your search look like? And if this problem occurs when you add your subsearch, run the subsearch on its own (without the brackets etc) and add "&lt;CODE&gt;| format&lt;/CODE&gt;" at the end. This will show you the exact filter string that the subsearch will emit.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 20:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81135#M20516</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-07-01T20:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81136#M20517</link>
      <description>&lt;P&gt;Ayn - I probably should have bolded out the search that I was trying to use so that it was a little more clear and stood out. The search that I started out with is mentioned above for you to review, in my original post. Thanks for taking the time to try and help me.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 20:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81136#M20517</guid>
      <dc:creator>Darksynergy</dc:creator>
      <dc:date>2013-07-01T20:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81137#M20518</link>
      <description>&lt;P&gt;I tried running the subsearch on its own with the "| format" as you suggested and got the following error.&lt;/P&gt;

&lt;P&gt;Error in 'format' command: The '&lt;RESULTSTART&gt; &lt;COLSTART&gt; &lt;COLSEPARATOR&gt; &lt;COLEND&gt; &lt;ROWSEPARATOR&gt; &lt;RESULTEND&gt;' arguments must be specified together or not at all.*&lt;/RESULTEND&gt;&lt;/ROWSEPARATOR&gt;&lt;/COLEND&gt;&lt;/COLSEPARATOR&gt;&lt;/COLSTART&gt;&lt;/RESULTSTART&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 21:05:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81137#M20518</guid>
      <dc:creator>Darksynergy</dc:creator>
      <dc:date>2013-07-01T21:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81138#M20519</link>
      <description>&lt;P&gt;Show the exact search you're running, please.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 21:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81138#M20519</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-07-01T21:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81139#M20520</link>
      <description>&lt;P&gt;Ayn:&lt;/P&gt;

&lt;P&gt;Original search:&lt;/P&gt;

&lt;P&gt;*.exe NOT ("Specific-Service-Account") NOT ("Specific-Service-Account1") NOT ("dsmod.exe") NOT $ NOT [| inputlookup ExclusionList.csv | ("User_Name") OR ("Image_File_Name")] | stats count by User_Name, Image_File_Name, host | sort count desc&lt;/P&gt;

&lt;P&gt;Running search as you suggested:&lt;/P&gt;

&lt;P&gt;inputlookup ExclusionList.csv | ("User_Name") OR ("Image_File_Name") | stats count by User_Name, Image_File_Name, host | sort count desc&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:13:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81139#M20520</guid>
      <dc:creator>Darksynergy</dc:creator>
      <dc:date>2020-09-28T14:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81140#M20521</link>
      <description>&lt;P&gt;I don't see format there? Anyway, two errors that I can see right away: you're missing a pipe before inputlookup. Also after the first pipe you don't have a command at all? Just something that seems to be meant to be search filters?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 21:55:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81140#M20521</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-07-01T21:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81141#M20522</link>
      <description>&lt;P&gt;Thanks to all of you that gave me some pointers on a direction to go to with addressing my issue. I ended going with something a little less complex in regards to using a table as a lookup for exclusions. Because I was only going to be having 10-15 service accounts and services that I that needed to be excluded, I chose to go with the following:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;**.exe NOT ("Specific-Service-Account") NOT ("Specific-Service-Account1") NOT ("dsmod.exe") NOT $ NOT (ServiceAccount OR WHATEVER.exe) NOT (ServiceAccount1 OR WHATEVER1.exe) NOT (ServiceAccount2 OR WHATEVER2.exe) NOT (ServiceAccount3 OR WHATEVER3.exe) | stats count by User_Name, Image_File_Name, host | sort count desc&lt;/EM&gt;*&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:14:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81141#M20522</guid>
      <dc:creator>Darksynergy</dc:creator>
      <dc:date>2020-09-28T14:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use lookup to exclude a list of user_names and service_file_names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81142#M20523</link>
      <description>&lt;P&gt;You can add a flag to your lookup to tell the next part of the pipeline what to do.&lt;/P&gt;

&lt;P&gt;e.g.&lt;/P&gt;

&lt;P&gt;file.csv:&lt;BR /&gt;
thing, exclude&lt;BR /&gt;
some_user,1&lt;BR /&gt;
other_user,1&lt;/P&gt;

&lt;P&gt;Define the lookup as minimum match = 1 and fill unmatched values with 0.&lt;/P&gt;

&lt;P&gt;then in your search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_stream| lookup yourlookup thing | search exclude=0 | do something to what's left
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;much easier to maintain...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-lookup-to-exclude-a-list-of-user-names-and-service/m-p/81142#M20523</guid>
      <dc:creator>cmeo</dc:creator>
      <dc:date>2020-09-28T17:36:56Z</dc:date>
    </item>
  </channel>
</rss>

