<?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 compare search result with a lookup file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-search-result-with-a-lookup-file/m-p/383938#M112139</link>
    <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sql sourcetype="mssql:execution:dm_exec_sessions" host="*" | rename client_net_address AS "IP_Origem" current_database_name AS Datase_Name original_login_name AS "Usuário" |stats count by login_time, IP_Origem, Datase_Name , Usuário 
| where NOT [| inputlookup YourLookupTable.csv | table original_login_name, client_net_address ,Datase_Name | rename original_login_name AS "Usuário" , client_net_address  as AS "IP_Origem"  ]|sort - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 14 Jun 2018 19:06:45 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2018-06-14T19:06:45Z</dc:date>
    <item>
      <title>How to compare search result with a lookup file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-search-result-with-a-lookup-file/m-p/383937#M112138</link>
      <description>&lt;P&gt;I have a lookup file with the following fields&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;original_login_name, client_net_address and Datase_Name&lt;BR /&gt;
I have these my fields in my search for splunk, using the query&lt;/P&gt;

&lt;P&gt;index=sql sourcetype="mssql:execution:dm_exec_sessions" host="*" | rename client_net_address AS "IP_Origem" current_database_name AS Datase_Name original_login_name AS "Usuário" |stats count by login_time, IP_Origem, Datase_Name, Usuário |sort - count&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;How do I make a comparison between the search and the lookup, so that it returns me to only results that are not the same as the original_login_name, client_net, address and Datase_name fields?&lt;/P&gt;

&lt;P&gt;Examples: &lt;/P&gt;

&lt;P&gt;Lookup:&lt;BR /&gt;
Fields: original_login_name, client_net_address, Datase_name&lt;BR /&gt;
Value: aud_cdt, 10.1.1.5, Teste&lt;/P&gt;

&lt;P&gt;Logs:&lt;BR /&gt;
Fields: original_login_name, client_net_address, Datase_name&lt;BR /&gt;
Value: aud_cdt, 10.1.1.5, Teste&lt;BR /&gt;
Value: aud_cdt, 10.1.1.8, Teste&lt;BR /&gt;
Value: edt_aud, 10.1.1.5, Teste&lt;/P&gt;

&lt;P&gt;The search should return the following results:&lt;BR /&gt;
Value: aud_cdt, 10.1.1.8, Teste&lt;BR /&gt;
Value: edt_aud, 10.1.1.5, Teste&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-search-result-with-a-lookup-file/m-p/383937#M112138</guid>
      <dc:creator>LeandroKopke</dc:creator>
      <dc:date>2020-09-29T20:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare search result with a lookup file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-search-result-with-a-lookup-file/m-p/383938#M112139</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sql sourcetype="mssql:execution:dm_exec_sessions" host="*" | rename client_net_address AS "IP_Origem" current_database_name AS Datase_Name original_login_name AS "Usuário" |stats count by login_time, IP_Origem, Datase_Name , Usuário 
| where NOT [| inputlookup YourLookupTable.csv | table original_login_name, client_net_address ,Datase_Name | rename original_login_name AS "Usuário" , client_net_address  as AS "IP_Origem"  ]|sort - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:06:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-search-result-with-a-lookup-file/m-p/383938#M112139</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-06-14T19:06:45Z</dc:date>
    </item>
  </channel>
</rss>

