<?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 How to compare between individual values from two fields having multiple values  ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428506#M122587</link>
    <description>&lt;P&gt;I have 2 fields from my search, something like this -&lt;BR /&gt;
Errorcode, ErrorDescription&lt;BR /&gt;
Err1, "abcd password is missing xyz"&lt;BR /&gt;
Err1, "1111 password is missing 222"&lt;BR /&gt;
Err1, "1233455 connection is not working 6789"&lt;/P&gt;

&lt;P&gt;Now I have another field called ErrorCategory which has a list of values like - &lt;BR /&gt;
Password is missing, Connection is not working ,xxxx, yyyy, jjjj...&lt;/P&gt;

&lt;P&gt;I want to compare each value of ErrorDescription with Error Category and the end result should look like this -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ErrorCode, ErrorDescription,ErrorCategory
Err1, "abcd password is missing xyz",Password is missing
Err1, "1111 password is missing 222",Password is missing
Err1, "1233455 connection is not working 6789",Connection is not working
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Right now, when I am trying to use match and compare, it is comparing the entire ErrorCatgory list with each value of ErrorDescription, so it is not able to match. &lt;/P&gt;

&lt;P&gt;How do I achieve the one on one comparison between fields having multiple values ? Does anyone have any idea how to achieve this ?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Aug 2018 13:09:51 GMT</pubDate>
    <dc:creator>Upas02</dc:creator>
    <dc:date>2018-08-28T13:09:51Z</dc:date>
    <item>
      <title>How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428506#M122587</link>
      <description>&lt;P&gt;I have 2 fields from my search, something like this -&lt;BR /&gt;
Errorcode, ErrorDescription&lt;BR /&gt;
Err1, "abcd password is missing xyz"&lt;BR /&gt;
Err1, "1111 password is missing 222"&lt;BR /&gt;
Err1, "1233455 connection is not working 6789"&lt;/P&gt;

&lt;P&gt;Now I have another field called ErrorCategory which has a list of values like - &lt;BR /&gt;
Password is missing, Connection is not working ,xxxx, yyyy, jjjj...&lt;/P&gt;

&lt;P&gt;I want to compare each value of ErrorDescription with Error Category and the end result should look like this -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ErrorCode, ErrorDescription,ErrorCategory
Err1, "abcd password is missing xyz",Password is missing
Err1, "1111 password is missing 222",Password is missing
Err1, "1233455 connection is not working 6789",Connection is not working
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Right now, when I am trying to use match and compare, it is comparing the entire ErrorCatgory list with each value of ErrorDescription, so it is not able to match. &lt;/P&gt;

&lt;P&gt;How do I achieve the one on one comparison between fields having multiple values ? Does anyone have any idea how to achieve this ?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 13:09:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428506#M122587</guid>
      <dc:creator>Upas02</dc:creator>
      <dc:date>2018-08-28T13:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428507#M122588</link>
      <description>&lt;P&gt;From where does the ErrorCategory field come? Is it a lookup table OR field in your raw data? &lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 15:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428507#M122588</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-08-28T15:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428508#M122589</link>
      <description>&lt;P&gt;Do you want to compare only the textpart of ErrorDescription and ErrorCategory?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 23:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428508#M122589</guid>
      <dc:creator>nadlurinadluri</dc:creator>
      <dc:date>2018-08-28T23:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428509#M122590</link>
      <description>&lt;P&gt;@somesoni2 , Yes exactly, the ErrorCategory comes from a lookup file. The lookup has only ErrorCode and ErrorCategory, I need to match the text of the ErrorDescription and assign it to a ErrorCategory.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 08:05:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428509#M122590</guid>
      <dc:creator>Upas02</dc:creator>
      <dc:date>2018-08-29T08:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428510#M122591</link>
      <description>&lt;P&gt;Yes, compare only text part, ErrorDescription will be more detailed and ErrorCategory will be a short one&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 08:06:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428510#M122591</guid>
      <dc:creator>Upas02</dc:creator>
      <dc:date>2018-08-29T08:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428511#M122592</link>
      <description>&lt;P&gt;Actually, to give u more details, this is the command i m using -&lt;BR /&gt;
index=test (Error* OR fault* OR warning* OR fail*) "searchID"| &lt;BR /&gt;
| lookup mylookup.csv ErrorCode OUTPUTNEW ErrorCategory | eval match=if(like(ErrorDescription,"%".Error_Category."%"),"Yes","No") | table searchID, ErrorCode, ErrorDescription, ErrorCategory, match&lt;/P&gt;

&lt;P&gt;But I am not getting any match, i am getting teh below table output-&lt;BR /&gt;
ErrorCode, ErrorDescription,ErrorCategory,match&lt;BR /&gt;
Err1, "abcd password is missing xyz",Password is missing,Connection is not working,xxxx,yyyy,jjjj,no&lt;/P&gt;

&lt;P&gt;Basically it is trying to compare the entire list of ErrorCategory against the one ErrorDescription.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 08:13:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428511#M122592</guid>
      <dc:creator>Upas02</dc:creator>
      <dc:date>2018-08-29T08:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428512#M122593</link>
      <description>&lt;P&gt;Anyone has any solution to this ?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 18:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428512#M122593</guid>
      <dc:creator>Upas02</dc:creator>
      <dc:date>2018-09-03T18:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428513#M122594</link>
      <description>&lt;P&gt;hmm are you matching the case properly?&lt;/P&gt;

&lt;P&gt;Like("abcd password is missing xyz") is not equal to Like(Password is missing).  ErrorCategory starts with an upper case. Have you tried using something like &lt;CODE&gt;|eval ErrorCategory=LOWER(ErrorCategory)&lt;/CODE&gt;&lt;BR /&gt;
And then trying out your match eval?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 14:19:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428513#M122594</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-09-10T14:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare between individual values from two fields having multiple values  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428514#M122595</link>
      <description>&lt;P&gt;Create a &lt;CODE&gt;lookup file&lt;/CODE&gt; with content  like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ErrorDescription, ErrorCategory
*Password is missing*,Password is missing
*Connection is not working*,Connection is not working
...,...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then create a &lt;CODE&gt;lookup definition&lt;/CODE&gt; which sets &lt;CODE&gt;WIDLCARD(ErrorDescription)&lt;/CODE&gt; and &lt;CODE&gt;Ignore Case&lt;/CODE&gt;.&lt;BR /&gt;
Then just do a lookup like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | lookup YourLookupDefinitionHere ErrorDescription
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Sep 2018 15:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-between-individual-values-from-two-fields-having/m-p/428514#M122595</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-09-10T15:28:46Z</dc:date>
    </item>
  </channel>
</rss>

