<?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 filter results by CSV Lookup? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497074#M84750</link>
    <description>&lt;P&gt;I managed to solve it, the search needed was:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=WebFilter [| inputlookup BadWords.csv | eval BadWordsList="*"+BadWordsList+"*" | rename BadWordsList as web_GoogleSearch] | stats count by web_GoogleSearch, web_User, _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 28 Jan 2020 16:18:51 GMT</pubDate>
    <dc:creator>driva</dc:creator>
    <dc:date>2020-01-28T16:18:51Z</dc:date>
    <item>
      <title>How to filter results by CSV Lookup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497071#M84747</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I'm working with the syslogs of a basic web filter. I have a CSV file containing "bad words searched" that I'd like to report on. Essentially, I'd like to create a Table with Username, IP and the "Bad Word Searched". Currently I can create a a table with Username, IP and ALL words searched but not able to filter results based on the lookup.&lt;/P&gt;

&lt;P&gt;My current search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=WebFilter | stats count by Web_username, Web_IP, Web_GoogleSearch | sort -count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How could I use a lookup file to filter the results?&lt;/P&gt;

&lt;P&gt;Ideally I'd like something like this but I can't get the syntax right as I'm not sure how to apply this to the results properly: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=WebFilter [| inputlookup BadWords.csv | rename BadWordsList as Web_BadWords] | stats count by Web_username, Web_IP, Web_GoogleSearch, Web_BadWords | sort -count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any guidance would be amazing, thank you.&lt;/P&gt;

&lt;P&gt;Best wishes,&lt;BR /&gt;
D&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 12:52:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497071#M84747</guid>
      <dc:creator>driva</dc:creator>
      <dc:date>2020-01-28T12:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter results by CSV Lookup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497072#M84748</link>
      <description>&lt;P&gt;You can try:&lt;/P&gt;

&lt;P&gt;index=WebFilter | lookup BadWords.csv BadWordsList as Web_BadWords OUTPUT BadWordsList | stats count by Web_username, Web_IP, Web_GoogleSearch, &lt;STRONG&gt;BadWordsList&lt;/STRONG&gt; | sort -count&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497072#M84748</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-09-30T03:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter results by CSV Lookup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497073#M84749</link>
      <description>&lt;P&gt;Hi, thanks for your response! I tried the search which didn't throw up an error this (which is good) however I get back 0 results. Would this be because the Web_GoogleSearch contains the bad word within the string and not an exact match in the CSV file? If this is the case, is there anything I can do to say 'if Web_GoogleSearch contains word from list, output the results'? Thanks for your help. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:56:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497073#M84749</guid>
      <dc:creator>driva</dc:creator>
      <dc:date>2020-09-30T03:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter results by CSV Lookup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497074#M84750</link>
      <description>&lt;P&gt;I managed to solve it, the search needed was:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=WebFilter [| inputlookup BadWords.csv | eval BadWordsList="*"+BadWordsList+"*" | rename BadWordsList as web_GoogleSearch] | stats count by web_GoogleSearch, web_User, _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jan 2020 16:18:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-results-by-CSV-Lookup/m-p/497074#M84750</guid>
      <dc:creator>driva</dc:creator>
      <dc:date>2020-01-28T16:18:51Z</dc:date>
    </item>
  </channel>
</rss>

