<?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: Help on tstats search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-0-data-rows-using-tstats-query/m-p/645863#M223611</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;have you try this &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Makecontinuous" target="_self"&gt;makecontinuous&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2023 07:24:05 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2023-06-06T07:24:05Z</dc:date>
    <item>
      <title>How to get the 0 data rows using tstats query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-0-data-rows-using-tstats-query/m-p/645168#M223408</link>
      <description>&lt;P&gt;Original query:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=app-data  sourcetype=clientapp-code
|rex field=_raw "\Status\:(?&amp;lt;Code&amp;gt;.*?)\|"
|eval Failed=if(Code!=0, "Failed", null())
|bucket _time span=1d
|stats count(Failed) as Fail by _time &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;OUTPUT:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;_time&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;Fail&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-22&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-23&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-24&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-25&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-26&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-27&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-28&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-29&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;tstats query:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;|tstats count where  index=app-data  sourcetype=clientapp-code by PREFIX(status:) _time span=1d
|rename status: as Code
|eval Failed=if(Code!=0, "Failed", null())
|where Code!=0
|stats values(count) by _time&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;OUTPUT:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;_time&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;Fail&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-22&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-24&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;2022-01-27&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to see original query&amp;nbsp; output&amp;nbsp; with tstats query but 0 data rows are not showing up in tstats command.&lt;BR /&gt;How can i get the 0 data rows using tstats query???&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 13:08:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-0-data-rows-using-tstats-query/m-p/645168#M223408</guid>
      <dc:creator>Vani_26</dc:creator>
      <dc:date>2023-06-06T13:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help on tstats search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-0-data-rows-using-tstats-query/m-p/645849#M223607</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248147"&gt;@Vani_26&lt;/a&gt;&amp;nbsp;- You forget to do | bucket in your second query.&lt;/P&gt;&lt;P&gt;Try adding either bucket or bin command before stats, similar to your first query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OR alternatively, you can use timechart command instead of the stats command.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=1d sum(count) as Fail&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 06:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-0-data-rows-using-tstats-query/m-p/645849#M223607</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-06-06T06:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help on tstats search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-0-data-rows-using-tstats-query/m-p/645863#M223611</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;have you try this &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Makecontinuous" target="_self"&gt;makecontinuous&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 07:24:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-0-data-rows-using-tstats-query/m-p/645863#M223611</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-06-06T07:24:05Z</dc:date>
    </item>
  </channel>
</rss>

