<?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 extract a field with rex and compare it against a lookup to find unmatched events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165616#M47059</link>
    <description>&lt;P&gt;Hi , &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index =casm_prod source =/opt/siteminder/log/smtracedefault.log sourcetype=smtrace supportcentral 
| rex "(\[[^\]]*\]){10}\[(?P[^\]]*)\]"   
| dedup sso_id | lookup identity_lookup sso as sso_id  OUTPUT sso as matched_email  
| where matched_email!="unmatched"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is not working ?? any idea .... &lt;/P&gt;

&lt;P&gt;But this ,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index =casm_prod source =/opt/siteminder/log/smtracedefault.log sourcetype=smtrace supportcentral 
| rex "(\[[^\]]*\]){10}\[(?P[^\]]*)\]"    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is getting the data ... sso_id ...&lt;/P&gt;

&lt;P&gt;but comparing it with a lookup table and events ... I'm not getting the unmatched data. Why is this not working ....????&lt;/P&gt;</description>
    <pubDate>Thu, 16 Oct 2014 17:56:16 GMT</pubDate>
    <dc:creator>siraj198204</dc:creator>
    <dc:date>2014-10-16T17:56:16Z</dc:date>
    <item>
      <title>How to extract a field with rex and compare it against a lookup to find unmatched events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165616#M47059</link>
      <description>&lt;P&gt;Hi , &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index =casm_prod source =/opt/siteminder/log/smtracedefault.log sourcetype=smtrace supportcentral 
| rex "(\[[^\]]*\]){10}\[(?P[^\]]*)\]"   
| dedup sso_id | lookup identity_lookup sso as sso_id  OUTPUT sso as matched_email  
| where matched_email!="unmatched"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is not working ?? any idea .... &lt;/P&gt;

&lt;P&gt;But this ,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index =casm_prod source =/opt/siteminder/log/smtracedefault.log sourcetype=smtrace supportcentral 
| rex "(\[[^\]]*\]){10}\[(?P[^\]]*)\]"    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is getting the data ... sso_id ...&lt;/P&gt;

&lt;P&gt;but comparing it with a lookup table and events ... I'm not getting the unmatched data. Why is this not working ....????&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2014 17:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165616#M47059</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2014-10-16T17:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field with rex and compare it against a lookup to find unmatched events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165617#M47060</link>
      <description>&lt;P&gt;In your configuration of the lookup &lt;CODE&gt;identity_lookup&lt;/CODE&gt;, did you define a default value of "unmatched"?&lt;/P&gt;

&lt;P&gt;You might also replace&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where matched_email!="unmatched"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where matched_email="*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This may work if you didn't set a default value.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2014 20:28:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165617#M47060</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-10-16T20:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field with rex and compare it against a lookup to find unmatched events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165618#M47061</link>
      <description>&lt;P&gt;Do note though, &lt;CODE&gt;where matched_email="*"&lt;/CODE&gt; will look for a literal asterisk. Use &lt;CODE&gt;search matched_email="*"&lt;/CODE&gt; to say "matched_email contains a value".&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2014 20:42:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165618#M47061</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-16T20:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field with rex and compare it against a lookup to find unmatched events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165619#M47062</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;index =casm_prod source =/opt/siteminder/log/smtracedefault.log sourcetype=smtrace supportcentral | rex "([[^]]]){10}[(?P[^]])]" |dedup sso_id | lookup identity_lookup sso as sso_id OUTPUT sso as matched_sso |where matched_sso!="NonNbcAccount"&lt;/P&gt;

&lt;P&gt;it is working good ,&lt;/P&gt;

&lt;P&gt;but it is adding the null value also ,&lt;/P&gt;

&lt;P&gt;›&lt;/P&gt;

&lt;P&gt;10/17/14&lt;BR /&gt;
10:52:07.108 AM&lt;/P&gt;

&lt;P&gt;Example ,&lt;/P&gt;

&lt;P&gt;[10/17/2014][07:52:07.108][486480816][][][SupportCentral allow access][NBCU SC_Lib_Allow_Policy][][][][][][][][][][][Policy is applicable. Rule is applicable. Get Responses.][]&lt;BR /&gt;
host =useclpapl894.nbcuni.ge.com&lt;BR /&gt;
matched_sso ="NonNbcAccount"&lt;BR /&gt;
source =/opt/siteminder/log/smtracedefault.log&lt;BR /&gt;
sourcetype =smtrace&lt;BR /&gt;
sso_id =&lt;/P&gt;

&lt;P&gt;here the 11 the value is [] null value there is no id ... inside .... but it is also showing as " "NonNbcaccount" ... it should not show up ....&lt;/P&gt;

&lt;P&gt;Thanks u ....&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:54:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-with-rex-and-compare-it-against-a-lookup/m-p/165619#M47062</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2020-09-28T17:54:24Z</dc:date>
    </item>
  </channel>
</rss>

