<?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: Compare field with column of lookup table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576685#M200977</link>
    <description>&lt;P&gt;Thanks again, adding the error codes on multiple lines works&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 06:07:15 GMT</pubDate>
    <dc:creator>giorgioanastasi</dc:creator>
    <dc:date>2021-11-30T06:07:15Z</dc:date>
    <item>
      <title>Compare field with column of lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576538#M200924</link>
      <description>&lt;P&gt;Hi all, I have this need, compare a field with a series of error codes. I would not like to write in the search, any error codes, but I would like to use a lookup table. I then entered the error codes in a column (Name = Errors) of the table, but when i&amp;nbsp; perform the search, they are not compared correctly.&lt;/P&gt;&lt;P&gt;In the column, for example, is present: login.error.1004&lt;/P&gt;&lt;P&gt;In the search: tag = Log | lookup ServiziApp.csv ServiceName AS Service | search Functionality = "Access" errorCode! = Errors&lt;/P&gt;&lt;P&gt;But the lines despite having a field = login.error.1004, are displayed. Checking the extracted fields, the errorCode field contains login.error.1004 and the Errors field also contains login.error.1004.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sun, 28 Nov 2021 20:45:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576538#M200924</guid>
      <dc:creator>giorgioanastasi</dc:creator>
      <dc:date>2021-11-28T20:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field with column of lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576539#M200925</link>
      <description>&lt;P&gt;Firstly, the search command does not compare field against field, so the&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;errorCode! = Errors&lt;/LI-CODE&gt;&lt;P&gt;is actually looking for the text Errors in the errorCode field.&lt;/P&gt;&lt;P&gt;replace the search with&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where Functionality="Access" AND !match(errorCode, Errors)&lt;/LI-CODE&gt;&lt;P&gt;however,&amp;nbsp; do you have the same ServiceName more than once in the lookup file. If so, then you will have Errors as a multi value field, and you would have to use something like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where !in(errorCode, Errors)&lt;/LI-CODE&gt;&lt;P&gt;for that case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Nov 2021 21:26:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576539#M200925</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-11-28T21:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field with column of lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576576#M200939</link>
      <description>&lt;P&gt;Hi Bowesmana and thanks for the response.&lt;/P&gt;&lt;P&gt;match work correctly with one error code,&amp;nbsp;if i add other error codes in the lookup table, !IN(errorCode, Errors) does not work, i.e. the search does not filter these cases.&lt;/P&gt;&lt;P&gt;This is the contents of the lookup column:&lt;/P&gt;&lt;P&gt;login.error.E99999 login.error.10002&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 10:12:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576576#M200939</guid>
      <dc:creator>giorgioanastasi</dc:creator>
      <dc:date>2021-11-29T10:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field with column of lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576580#M200940</link>
      <description>&lt;P&gt;OK, there's the issue - the lookup will not perform a wildcard match for the event error code against any value in the column from the lookup. You can make the lookup support wildcards, but what you actually want here is multiple values, so I suggest that you make a new row in the lookup for each error code you want&amp;nbsp;&lt;/P&gt;&lt;P&gt;In that case, the in() logic will work when you do the lookup, as all the errorcodes from the lookup file matching the service you are looking for, will be returned as a multi-value field and then the in() can find it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 10:17:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576580#M200940</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-11-29T10:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field with column of lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576685#M200977</link>
      <description>&lt;P&gt;Thanks again, adding the error codes on multiple lines works&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 06:07:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-field-with-column-of-lookup-table/m-p/576685#M200977</guid>
      <dc:creator>giorgioanastasi</dc:creator>
      <dc:date>2021-11-30T06:07:15Z</dc:date>
    </item>
  </channel>
</rss>

