<?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: Lookup against multiple columns in CSV file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587789#M204708</link>
    <description>&lt;P&gt;Thanks a lot. Is there other way to merge checking against multiple columns in one input lookup command&amp;nbsp; given that its referencing the same csv file ?&lt;BR /&gt;Right now as you can see we are calling | inputlookup twice for the same csv .&amp;nbsp; Any way to consolidate into one ?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2022 04:01:01 GMT</pubDate>
    <dc:creator>neerajs_81</dc:creator>
    <dc:date>2022-03-07T04:01:01Z</dc:date>
    <item>
      <title>How to lookup against multiple columns in CSV file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587645#M204649</link>
      <description>&lt;P&gt;Hello All,&lt;BR /&gt;how can we search against 2 columns of a CSV lookup file and if the value of the field that i am searching for happens to be either of the 2 columns, then exclude those results ? Kind of a whitelist.&lt;/P&gt;
&lt;P&gt;Lets say i have a csv table of 2 columns as follows&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;URLs&lt;/TD&gt;
&lt;TD width="50%"&gt;UA&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;i am searching against my firewall logs and if the &lt;STRONG&gt;url&lt;/STRONG&gt; field in the events matches&amp;nbsp; against &lt;STRONG&gt;URLs&lt;/STRONG&gt; column of the table&amp;nbsp; OR the &lt;STRONG&gt;user_agent&lt;/STRONG&gt; field from events matches the &lt;STRONG&gt;UA&lt;/STRONG&gt;&amp;nbsp;column of the table, then exclude those events&lt;BR /&gt;This is what i have come up with but its not working...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index= firewall 
NOT [ | inputlookup  lookup_file.csv | rename url as  URLs | fields url] OR NOT [ |inputlookup lookup_file.csv | rename user_agent as UA | fields user_agent] 
.......&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 02:39:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587645#M204649</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-03-08T02:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup against multiple columns in CSV file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587648#M204650</link>
      <description>&lt;P&gt;Try AND instead of OR&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index= firewall 
NOT [ | inputlookup  lookup_file.csv | rename url as  URLs | fields url] AND NOT [ |inputlookup lookup_file.csv | rename user_agent as UA | fields user_agent] 
.......&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Mar 2022 13:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587648#M204650</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-04T13:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup against multiple columns in CSV file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587789#M204708</link>
      <description>&lt;P&gt;Thanks a lot. Is there other way to merge checking against multiple columns in one input lookup command&amp;nbsp; given that its referencing the same csv file ?&lt;BR /&gt;Right now as you can see we are calling | inputlookup twice for the same csv .&amp;nbsp; Any way to consolidate into one ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 04:01:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587789#M204708</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-03-07T04:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup against multiple columns in CSV file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587796#M204710</link>
      <description>&lt;P&gt;You could try to somehow transform the inputlookup results in order to split it and form a single usable subsearch but unless it's a huge set, there's no much point.&lt;/P&gt;&lt;P&gt;I don't like subsearches as such but sometimes they are unavoidable. And in your case the subsearches seem to be fairly quick. And remember that they are evaluated before the main search so you don't have to evaluate those inputlookups separately for each main search result line.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 06:15:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-lookup-against-multiple-columns-in-CSV-file/m-p/587796#M204710</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-07T06:15:17Z</dc:date>
    </item>
  </channel>
</rss>

