<?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 a timechart of all hosts even if 0 values exist in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Show-a-timechart-of-all-hosts-even-if-0-values-exist/m-p/292167#M88265</link>
    <description>&lt;P&gt;Try like this (since host names are fixed)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index basesearch | timechart count by host span=1m | table _time Host1 Host2 Host3 | fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 17 Aug 2017 18:35:47 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-08-17T18:35:47Z</dc:date>
    <item>
      <title>Show a timechart of all hosts even if 0 values exist</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-a-timechart-of-all-hosts-even-if-0-values-exist/m-p/292165#M88263</link>
      <description>&lt;P&gt;I'm attempting to write a query to show a timechart of the number of results for each host per minute, which is easy enough using the following query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index basesearch | timechart count by host span=1m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It returns exactly what I'm after, except if there are 0 results in the base search for a specific host it doesn't include a column for it.&lt;/P&gt;

&lt;P&gt;If there are results for two hosts but not the 3rd I want it to return the following&lt;BR /&gt;
--------------Host 1   Host 2   Host 3&lt;BR /&gt;
Minute1 ------2---------1-----------0&lt;BR /&gt;
Minute2 ------3---------0-----------0&lt;BR /&gt;
Minute3 ------2---------6-----------0&lt;/P&gt;

&lt;P&gt;The number of hosts will always be the same so if needed can be specified somehow in the search&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 01:14:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-a-timechart-of-all-hosts-even-if-0-values-exist/m-p/292165#M88263</guid>
      <dc:creator>Lgo</dc:creator>
      <dc:date>2017-08-17T01:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Show a timechart of all hosts even if 0 values exist</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-a-timechart-of-all-hosts-even-if-0-values-exist/m-p/292166#M88264</link>
      <description>&lt;P&gt;There may be more efficient search sentences･･･&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=index  by host
| map maxsearches=10000 search="search index=index basesearch  host=$host$
      | timechart span=1m count
      | eval host=\"$host$\""
| timechart span=1m sum(count) as count by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Replace tstats with the LOOKUP file if possible&lt;BR /&gt;
|inputlookuo XXXX|table host&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 04:54:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-a-timechart-of-all-hosts-even-if-0-values-exist/m-p/292166#M88264</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2017-08-17T04:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Show a timechart of all hosts even if 0 values exist</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-a-timechart-of-all-hosts-even-if-0-values-exist/m-p/292167#M88265</link>
      <description>&lt;P&gt;Try like this (since host names are fixed)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index basesearch | timechart count by host span=1m | table _time Host1 Host2 Host3 | fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Aug 2017 18:35:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-a-timechart-of-all-hosts-even-if-0-values-exist/m-p/292167#M88265</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-08-17T18:35:47Z</dc:date>
    </item>
  </channel>
</rss>

