<?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 count rows with lack of field ! in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45860#M10933</link>
    <description>&lt;P&gt;I stand corrected. Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2011 15:47:32 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2011-02-17T15:47:32Z</dc:date>
    <item>
      <title>how to count rows with lack of field !</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45854#M10927</link>
      <description>&lt;P&gt;so i have a log which has column/field which will be populated with "Y" if there is an ERROR, feild name is ERROR_FLAG and will be blank if there is no ERROR.&lt;/P&gt;

&lt;P&gt;how do i calculate rows where this FIELD is non-existant or blank ?&lt;/P&gt;

&lt;P&gt;alternatively, how do i subtract ERROR_FEILD="Y" Count from Total Row count to get me this data..
all has to be done in real time.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2011 04:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45854#M10927</guid>
      <dc:creator>ashishv</dc:creator>
      <dc:date>2011-02-17T04:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows with lack of field !</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45855#M10928</link>
      <description>&lt;P&gt;I think it will be easier to answer your question if you can provide us with some sample events. Once you have a working field extraction, the rest should pose no problems. If you've successfully extracted the field using name "error_field" for instance, you would just have to do&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;error_field!="Y"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm unsure what you mean by that it has to be done in real time. The field extractions will work on any search, regardless of what time range you choose (including real-time).&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2011 05:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45855#M10928</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-02-17T05:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows with lack of field !</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45856#M10929</link>
      <description>&lt;P&gt;Not-Exist OR blank is a bit tricky.  Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(ERROR="" OR NOT ERROR="*")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Feb 2011 05:05:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45856#M10929</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2011-02-17T05:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows with lack of field !</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45857#M10930</link>
      <description>&lt;P&gt;Oh, Ayn's solution is superior if it is really precisely as you describe.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2011 05:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45857#M10930</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2011-02-17T05:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows with lack of field !</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45858#M10931</link>
      <description>&lt;P&gt;Calculating non-existent or blank can be done like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... NOT ERROR_FLAG=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To count the rows where the field is not Y, including blank or missing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... NOT ERROR_FLAG="Y" | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;NOTE:  Using "&lt;CODE&gt;&amp;lt;field&amp;gt;!=&amp;lt;value&amp;gt;&lt;/CODE&gt;" will not account for missing or empty fields.  You should use the "&lt;CODE&gt;NOT &amp;lt;field&amp;gt;=&amp;lt;value&amp;gt;&lt;/CODE&gt;" syntax.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2011 05:16:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45858#M10931</guid>
      <dc:creator>Ron_Naken</dc:creator>
      <dc:date>2011-02-17T05:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows with lack of field !</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45859#M10932</link>
      <description>&lt;P&gt;This method will not account for blank values or a missing field. See my answer to account for these.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2011 05:21:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45859#M10932</guid>
      <dc:creator>Ron_Naken</dc:creator>
      <dc:date>2011-02-17T05:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to count rows with lack of field !</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45860#M10933</link>
      <description>&lt;P&gt;I stand corrected. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2011 15:47:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-count-rows-with-lack-of-field/m-p/45860#M10933</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-02-17T15:47:32Z</dc:date>
    </item>
  </channel>
</rss>

