<?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: Can you help me use the tstats command with a fillnull? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-use-the-tstats-command-with-a-fillnull/m-p/436150#M124328</link>
    <description>&lt;P&gt;Hi @kamlesh_vaghela,&lt;/P&gt;

&lt;P&gt;It looks like only those fields we can use with tstats which is extracted at time of indexing, as I am running &lt;CODE&gt;walklex&lt;/CODE&gt; on _internal index bucket and I can see &lt;CODE&gt;component&lt;/CODE&gt; field in tsidx file so we can use that in tstats but not other fields like &lt;CODE&gt;bytes&lt;/CODE&gt; from _internal index with above query (If we use datamodel then we can definitely use that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; but without datamodel I think tstats limits with only fields which are extracted at index time)&lt;/P&gt;</description>
    <pubDate>Wed, 17 Oct 2018 15:51:34 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2018-10-17T15:51:34Z</dc:date>
    <item>
      <title>Can you help me use the tstats command with a fillnull?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-use-the-tstats-command-with-a-fillnull/m-p/436148#M124326</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;So, I want to use the &lt;CODE&gt;tstats&lt;/CODE&gt; command.  It's super fast and efficient.  But not if it's going to remove important results.  Any record that happens to have just one null value at search time just gets eliminated from the count.  That's important data to know.&lt;/P&gt;

&lt;P&gt;With classic search I would do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* mysearch=*
| fillnull value="null" field1 field2 (etc...)
| stats count by field1 field2 (etc...)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;with this, I see my events, and if one shows up as "null" in a couple fields, well, I know it was empty!&lt;/P&gt;

&lt;P&gt;Can this be accomplished with the &lt;CODE&gt;tstats&lt;/CODE&gt; command?  Thank you so much.&lt;/P&gt;

&lt;P&gt;Sincerely,&lt;BR /&gt;
A want-to-be tstats advocate&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 22:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-use-the-tstats-command-with-a-fillnull/m-p/436148#M124326</guid>
      <dc:creator>chris94089</dc:creator>
      <dc:date>2018-10-16T22:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me use the tstats command with a fillnull?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-use-the-tstats-command-with-a-fillnull/m-p/436149#M124327</link>
      <description>&lt;P&gt;@chris94089&lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats count values(field1) as field1 values(field2) as field2 where index=YOUR_INDEX by _time | fillnull field1 field2 value="NULL" | stats sum(count) as count by  field1 field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;My Sample Search:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats count values(component) as component where index=_internal by _time index | fillnull component value="NULL" | stats sum(count) as count by  component
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 12:48:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-use-the-tstats-command-with-a-fillnull/m-p/436149#M124327</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-17T12:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me use the tstats command with a fillnull?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-use-the-tstats-command-with-a-fillnull/m-p/436150#M124328</link>
      <description>&lt;P&gt;Hi @kamlesh_vaghela,&lt;/P&gt;

&lt;P&gt;It looks like only those fields we can use with tstats which is extracted at time of indexing, as I am running &lt;CODE&gt;walklex&lt;/CODE&gt; on _internal index bucket and I can see &lt;CODE&gt;component&lt;/CODE&gt; field in tsidx file so we can use that in tstats but not other fields like &lt;CODE&gt;bytes&lt;/CODE&gt; from _internal index with above query (If we use datamodel then we can definitely use that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; but without datamodel I think tstats limits with only fields which are extracted at index time)&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 15:51:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-use-the-tstats-command-with-a-fillnull/m-p/436150#M124328</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-10-17T15:51:34Z</dc:date>
    </item>
  </channel>
</rss>

