<?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: Show count 0 on tstats with index name for multiple indexes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323431#M96531</link>
    <description>&lt;P&gt;My bad. I didn't set the span in timechart command so it was doing auto span based on number of points (which will be higher with longer timerange), try this version&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE earliest=-5d@-3h latest=now index=* by index, _time span=1h | timechart span=1h sum(count) as count by index limit=0 | fillnull value=0 | untable _time index count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Sep 2017 16:37:24 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-09-05T16:37:24Z</dc:date>
    <item>
      <title>Show count 0 on tstats with index name for multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323428#M96528</link>
      <description>&lt;P&gt;I have a search:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| tstats count WHERE earliest=-2d@-3h latest=now index=* by index, _time  | makecontinuous span=1h _time | eval count=if(isnull(count),0,count)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;where the count is shown as 0 if there is no data, however I get an empty field for the index at that specific time.  How can I search for every hour and every index and if index Y does not have any count to show:&lt;/P&gt;

&lt;P&gt;index    _time       &amp;amp;nbsp         count&lt;BR /&gt;
Y      2017-09-03 00:00       0&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 16:18:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323428#M96528</guid>
      <dc:creator>mkarimi17</dc:creator>
      <dc:date>2017-09-05T16:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Show count 0 on tstats with index name for multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323429#M96529</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE earliest=-2d@-3h latest=now index=* by index, _time span=1h | timechart sum(count) as count by index limit=0 | fillnull value=0 | untable _time index count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Sep 2017 16:21:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323429#M96529</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-05T16:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Show count 0 on tstats with index name for multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323430#M96530</link>
      <description>&lt;P&gt;thanks! that actually works but any idea why if I go back more than 4 days I lose the hour portion of the _time?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE earliest=-5d@-3h latest=now index=* by index, _time span=1h | timechart sum(count) as count by index limit=0 | fillnull value=0 | untable _time index count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;when I do that, time only shows the dates.  Realistically I am going back -30 days &lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 16:34:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323430#M96530</guid>
      <dc:creator>mkarimi17</dc:creator>
      <dc:date>2017-09-05T16:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Show count 0 on tstats with index name for multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323431#M96531</link>
      <description>&lt;P&gt;My bad. I didn't set the span in timechart command so it was doing auto span based on number of points (which will be higher with longer timerange), try this version&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE earliest=-5d@-3h latest=now index=* by index, _time span=1h | timechart span=1h sum(count) as count by index limit=0 | fillnull value=0 | untable _time index count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Sep 2017 16:37:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323431#M96531</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-05T16:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Show count 0 on tstats with index name for multiple indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323432#M96532</link>
      <description>&lt;P&gt;Perfect! thank you&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 17:05:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-count-0-on-tstats-with-index-name-for-multiple-indexes/m-p/323432#M96532</guid>
      <dc:creator>mkarimi17</dc:creator>
      <dc:date>2017-09-05T17:05:43Z</dc:date>
    </item>
  </channel>
</rss>

