<?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 Missing field detection in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Missing-field-detection/m-p/13763#M1371</link>
    <description>&lt;P&gt;Hi  &lt;/P&gt;

&lt;P&gt;I was wondering if there was a way to search for logs that don't have a specific field in them.&lt;BR /&gt;
If I have the following log file:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;id=112233,type=a,message=b,name=ewr,status=404  
id=2233,type=b,message=b,name=rrr  
id=434343,type=c,message=b,name=ooo,status=200  
id=6556,type=d,message=b,name=ppp  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I get lines 2 &amp;amp; 4 in my search (since they don't have the &lt;CODE&gt;status&lt;/CODE&gt; field)?&lt;BR /&gt;
Thanks for your help.  &lt;/P&gt;

&lt;P&gt;Ranga&lt;/P&gt;</description>
    <pubDate>Tue, 18 May 2010 22:58:59 GMT</pubDate>
    <dc:creator>sranga</dc:creator>
    <dc:date>2010-05-18T22:58:59Z</dc:date>
    <item>
      <title>Missing field detection</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Missing-field-detection/m-p/13763#M1371</link>
      <description>&lt;P&gt;Hi  &lt;/P&gt;

&lt;P&gt;I was wondering if there was a way to search for logs that don't have a specific field in them.&lt;BR /&gt;
If I have the following log file:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;id=112233,type=a,message=b,name=ewr,status=404  
id=2233,type=b,message=b,name=rrr  
id=434343,type=c,message=b,name=ooo,status=200  
id=6556,type=d,message=b,name=ppp  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I get lines 2 &amp;amp; 4 in my search (since they don't have the &lt;CODE&gt;status&lt;/CODE&gt; field)?&lt;BR /&gt;
Thanks for your help.  &lt;/P&gt;

&lt;P&gt;Ranga&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2010 22:58:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Missing-field-detection/m-p/13763#M1371</guid>
      <dc:creator>sranga</dc:creator>
      <dc:date>2010-05-18T22:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Missing field detection</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Missing-field-detection/m-p/13764#M1372</link>
      <description>&lt;P&gt;You want to use the search expression:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;&lt;CODE&gt;NOT status="*"&lt;/CODE&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Keep in mind that this is &lt;STRONG&gt;not&lt;/STRONG&gt; equivalent to:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;&lt;CODE&gt;status!="*"&lt;/CODE&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I recommend looking at this related question for additional explanation on this:  &lt;A href="http://answers.splunk.com/questions/310/how-can-i-search-for-a-missing-field" rel="nofollow"&gt;How can I search for a missing field?&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I should also point out that if the word "status" is part of the event (as shown in your example), then you could simply search like this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;&lt;CODE&gt;NOT status&lt;/CODE&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Which could be faster since "status" would be a term in the index, which is a faster operation than comparing an extracted field.  (Although, with a small number of events you may not notice the difference.)&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2010 23:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Missing-field-detection/m-p/13764#M1372</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-18T23:40:41Z</dc:date>
    </item>
  </channel>
</rss>

