<?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 inputlookup to filter in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217315#M42754</link>
    <description>&lt;P&gt;With your suggestion, this is the produced query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=tto* NOT ( ( known_issues="known issue1" ) OR ( known_issues="known issue1" ) )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so it doesn't produce the right result.  is it possible for me to tell splunk not the use the field?  one way I can think of is change the csv column header to be the same as my field name and add wildcard&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my_field_name
 "*known issue1*"
 "*known issue2*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so it would produce &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=tto* NOT ( ( my_field_name="*known issue1*" ) OR ( my_field_name="*known issue1*" ) )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Although i wonder if the wild card can have a perf hit.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2016 20:15:15 GMT</pubDate>
    <dc:creator>Hung_Nguyen</dc:creator>
    <dc:date>2016-02-24T20:15:15Z</dc:date>
    <item>
      <title>How to use inputlookup to filter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217309#M42748</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have multiple queries that I use to do daily report on errors in our production Splunk.  I would like to filter out known issues so the report is less cluttered with known issues.  I have create a lookup file, let's say "foo.csv", which has content:&lt;/P&gt;

&lt;P&gt;known_issues_strings&lt;BR /&gt;
NOT "known string"&lt;BR /&gt;
NOT "known issue1"&lt;BR /&gt;
NOT "known issue2"&lt;BR /&gt;
NOT "known issue3"&lt;BR /&gt;
etc .....&lt;/P&gt;

&lt;P&gt;Currently my search is like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=*logger* NOT "known string" NOT "known issue1"  NOT "known issue2" NOT "known issue3"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I use inputlookup so that I don't need to spell out all the filtering strings in each of my report searches? thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217309#M42748</guid>
      <dc:creator>Hung_Nguyen</dc:creator>
      <dc:date>2020-09-29T08:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup to filter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217310#M42749</link>
      <description>&lt;P&gt;Hello. Search the &lt;STRONG&gt;foo.csv&lt;/STRONG&gt; lookup file (under $SPLUNK_HOME/etc/system/lookups or $SPLUNK_HOME/etc/apps//lookups). like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup foo.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For more informations about the inputlookup command read this: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/Inputlookup" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/Inputlookup&lt;/A&gt;&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:54:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217310#M42749</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2020-09-29T08:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup to filter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217311#M42750</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype=logger AND NOT [|inputlookup foo.csv | fields+ known_issue_strings | rename known_issue_strings AS "your_error_field"]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2016 10:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217311#M42750</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2016-02-24T10:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup to filter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217312#M42751</link>
      <description>&lt;P&gt;try like :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=logger   [|inputlookup foo.csv ] |...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2016 11:32:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217312#M42751</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2016-02-24T11:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup to filter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217313#M42752</link>
      <description>&lt;P&gt;Assuming you want to do a text search of known errors, here is what I would suggest &lt;/P&gt;

&lt;P&gt;a) Update your lookup to just have the known error string.&lt;BR /&gt;
foo.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;known_issues_strings
"known string"
"known issue1"
"known issue2"
"known issue3"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Update#1&lt;/EM&gt;&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;b) Update your base search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=*logger* NOT [| intputlookup foo.csv | eval search="\".known_issues_strings."\"" | table search  ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2016 15:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217313#M42752</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-24T15:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup to filter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217314#M42753</link>
      <description>&lt;P&gt;I think this list would be easier to maintain in a macro, which is simply a condensed search string held in a Splunk knowledge object. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.4/Search/Usesearchmacros"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.4/Search/Usesearchmacros&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you insist on a lookup table and intend to search the values as raw strings in the events, you will need to rename the lookup table header field to "query".  Query is a reserved field name that allows this type of behavior. &lt;/P&gt;

&lt;P&gt;| inputlookup foo.csv | rename myfield AS query | fields query &lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 19:24:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217314#M42753</guid>
      <dc:creator>dcarmack_splunk</dc:creator>
      <dc:date>2016-02-24T19:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup to filter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217315#M42754</link>
      <description>&lt;P&gt;With your suggestion, this is the produced query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=tto* NOT ( ( known_issues="known issue1" ) OR ( known_issues="known issue1" ) )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so it doesn't produce the right result.  is it possible for me to tell splunk not the use the field?  one way I can think of is change the csv column header to be the same as my field name and add wildcard&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my_field_name
 "*known issue1*"
 "*known issue2*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so it would produce &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=tto* NOT ( ( my_field_name="*known issue1*" ) OR ( my_field_name="*known issue1*" ) )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Although i wonder if the wild card can have a perf hit.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 20:15:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217315#M42754</guid>
      <dc:creator>Hung_Nguyen</dc:creator>
      <dc:date>2016-02-24T20:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use inputlookup to filter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217316#M42755</link>
      <description>&lt;P&gt;Try the updated search, which will append double quotes around the values it retrieved from lookup.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 20:24:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-inputlookup-to-filter/m-p/217316#M42755</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-24T20:24:20Z</dc:date>
    </item>
  </channel>
</rss>

