<?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 do I pull a stats table where there are blank fields in event data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393250#M167407</link>
    <description>&lt;P&gt;This is the event data:&lt;BR /&gt;
ls1=INFO ls1Label=Severity ls2=MS SQL SERVER ls2Label=ServerType ls3=Command List ls3Label= cat=Audit sproc=ubuntu user=billy uid=DOMAIN\billybob dest= lhost=abrokenserver ohost=serverconnectedto CMD=su apt install *&lt;/P&gt;

&lt;P&gt;index=rootCMDs&lt;BR /&gt;
| rex field=_raw "^[^ \n]* (?P[^ ]+)"&lt;BR /&gt;
| rex field=_raw "^(?:[^|\n]&lt;EM&gt;|){5}(?P[^|]+)"&lt;BR /&gt;
| rex field=_raw "ls3label=(?.&lt;/EM&gt;)\scat="&lt;BR /&gt;
| eval ls3label=case(isnull(ls3label),"NULL",1=1,dst) &lt;BR /&gt;
| where isnotnull(ls3label) &lt;BR /&gt;
| search dst=" "&lt;BR /&gt;
| stats count by lhost, ls3label, sproc. user, uid&lt;BR /&gt;
| sort 0 count desc&lt;/P&gt;

&lt;P&gt;When I pull the stats count I get no data but the even data lists everything and has hundreds of events where *="no data". How do I specifically search for the blank data only? Or is my search improperly formatted?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:23:18 GMT</pubDate>
    <dc:creator>reneedeleon</dc:creator>
    <dc:date>2020-09-29T21:23:18Z</dc:date>
    <item>
      <title>How do I pull a stats table where there are blank fields in event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393250#M167407</link>
      <description>&lt;P&gt;This is the event data:&lt;BR /&gt;
ls1=INFO ls1Label=Severity ls2=MS SQL SERVER ls2Label=ServerType ls3=Command List ls3Label= cat=Audit sproc=ubuntu user=billy uid=DOMAIN\billybob dest= lhost=abrokenserver ohost=serverconnectedto CMD=su apt install *&lt;/P&gt;

&lt;P&gt;index=rootCMDs&lt;BR /&gt;
| rex field=_raw "^[^ \n]* (?P[^ ]+)"&lt;BR /&gt;
| rex field=_raw "^(?:[^|\n]&lt;EM&gt;|){5}(?P[^|]+)"&lt;BR /&gt;
| rex field=_raw "ls3label=(?.&lt;/EM&gt;)\scat="&lt;BR /&gt;
| eval ls3label=case(isnull(ls3label),"NULL",1=1,dst) &lt;BR /&gt;
| where isnotnull(ls3label) &lt;BR /&gt;
| search dst=" "&lt;BR /&gt;
| stats count by lhost, ls3label, sproc. user, uid&lt;BR /&gt;
| sort 0 count desc&lt;/P&gt;

&lt;P&gt;When I pull the stats count I get no data but the even data lists everything and has hundreds of events where *="no data". How do I specifically search for the blank data only? Or is my search improperly formatted?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393250#M167407</guid>
      <dc:creator>reneedeleon</dc:creator>
      <dc:date>2020-09-29T21:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull a stats table where there are blank fields in event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393251#M167408</link>
      <description>&lt;P&gt;@reneedeleon&lt;/P&gt;

&lt;P&gt;Have you tried `fillnull' command to assigned default value instead of keeping null value?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.3/SearchReference/Fillnull"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.3/SearchReference/Fillnull&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fillnull value="NA" lhost, ls3label, sproc. user, uid
| stats count by lhost, ls3label, sproc. user, uid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Sep 2018 18:28:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393251#M167408</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-09-26T18:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull a stats table where there are blank fields in event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393252#M167409</link>
      <description>&lt;P&gt;Converted comment to answer because that's the answer.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 04:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393252#M167409</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-09-27T04:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull a stats table where there are blank fields in event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393253#M167410</link>
      <description>&lt;P&gt;Thank you Dal,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Let me ask another question to the answer. Is it plausible to search multiple fields where there is data and NULL values. 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;maybe:&lt;/P&gt;

&lt;P&gt;| search  *=NULL  OR  | where *=NULL&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:36:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-a-stats-table-where-there-are-blank-fields-in/m-p/393253#M167410</guid>
      <dc:creator>reneedeleon</dc:creator>
      <dc:date>2018-09-27T11:36:25Z</dc:date>
    </item>
  </channel>
</rss>

