<?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: How to show computer in horizontal chart event if there are 0 events in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610598#M50059</link>
    <description>&lt;P&gt;Here's one example of how to fill in gaps&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=50
| eval _time=now()-((random() % 60) * 60)
| eval host=mvindex(split("hosta,hostb,hostc",","), random() % 3) 
| bin _time span=5m 
| stats count by _time,host
| eval count=if(count&amp;gt;0,1,0)
| append [
  | makeresults
  | eval host=split("hosta,hostb,hostc",",")
  | addinfo
  | eval time_window = info_max_time - info_min_time
  | eval bin_count = round(time_window / 300)
  | mvexpand host
  | eval bins=mvrange(1, bin_count + 1, 1)
  | mvexpand bins
  | eval _time=now() - (bins * 300)
  | eval count = 0, dummy=1
  | fields _time host count 
]
| bin _time span=5m 
| stats max(count) as count by _time,host
|timechart span=5m limit=0 last(count) by host&lt;/LI-CODE&gt;&lt;P&gt;It generates the additional check data in the append by taking all the 'known' hosts and creating extra rows on the end for each 5 minute bin within the search window, and then stats joins them back together - then you can use your timechart at the end&lt;/P&gt;&lt;P&gt;There's probably another way to fill the gaps - there always is with Splunk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2022 03:21:51 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-08-24T03:21:51Z</dc:date>
    <item>
      <title>How to show computer in horizontal chart event if there are 0 events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610462#M50048</link>
      <description>&lt;P&gt;I want to have a graph where where you can easily see when that system is no longer taking kerberos authentications.&amp;nbsp; But when it doesn't show anything for over 12h, then that object is no longer in that graph. Is there a way to keep my servers showing even if there are 0 events for that time period?&lt;/P&gt;&lt;P&gt;index=perfmon source="Perfmon:Security System-Wide Statistics" counter="Kerberos Authentications" earliest=-12h latest=now&lt;BR /&gt;[inputlookup Prod_DC.csv]&lt;BR /&gt;| eval host=lower(host)&lt;BR /&gt;|bucket span=5m time | stats count by _time,host|eval count=if(count&amp;gt;0,1,0)&lt;BR /&gt;|timechart span=5m limit=0 last(count) by host&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 08:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610462#M50048</guid>
      <dc:creator>LyDang</dc:creator>
      <dc:date>2022-08-23T08:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to show computer in horizontal chart event if there are 0 events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610465#M50049</link>
      <description>&lt;P&gt;To show something that doesn't exist means you have to add that 'known' component back in. That means after your search you have to add back all the hosts you expect to see. If your hosts are in&amp;nbsp;&lt;SPAN&gt;Prod_DC.csv you will need to append that data then massage the results with something like the method below for a simple stats collection&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;....
| append [
  | inputlookup Prod_DC.csv
  | eval count=0
]
| stats max(count) as count by host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 08:43:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610465#M50049</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-08-23T08:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to show computer in horizontal chart event if there are 0 events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610589#M50058</link>
      <description>&lt;P&gt;The problem is that I have:&lt;/P&gt;&lt;P&gt;|bucket span=5m time | stats count by _time,host|eval count=if(count&amp;gt;0,1,0)&lt;/P&gt;&lt;P&gt;I think this put events in 5m time slots.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a chart that will tell me every 5 minutes if 1/There are any events or 2/There are 0 events.&lt;/P&gt;&lt;P&gt;Also to have the server on the list if 0 events for that 12 hours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 01:24:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610589#M50058</guid>
      <dc:creator>LyDang</dc:creator>
      <dc:date>2022-08-24T01:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to show computer in horizontal chart event if there are 0 events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610598#M50059</link>
      <description>&lt;P&gt;Here's one example of how to fill in gaps&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=50
| eval _time=now()-((random() % 60) * 60)
| eval host=mvindex(split("hosta,hostb,hostc",","), random() % 3) 
| bin _time span=5m 
| stats count by _time,host
| eval count=if(count&amp;gt;0,1,0)
| append [
  | makeresults
  | eval host=split("hosta,hostb,hostc",",")
  | addinfo
  | eval time_window = info_max_time - info_min_time
  | eval bin_count = round(time_window / 300)
  | mvexpand host
  | eval bins=mvrange(1, bin_count + 1, 1)
  | mvexpand bins
  | eval _time=now() - (bins * 300)
  | eval count = 0, dummy=1
  | fields _time host count 
]
| bin _time span=5m 
| stats max(count) as count by _time,host
|timechart span=5m limit=0 last(count) by host&lt;/LI-CODE&gt;&lt;P&gt;It generates the additional check data in the append by taking all the 'known' hosts and creating extra rows on the end for each 5 minute bin within the search window, and then stats joins them back together - then you can use your timechart at the end&lt;/P&gt;&lt;P&gt;There's probably another way to fill the gaps - there always is with Splunk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 03:21:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610598#M50059</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-08-24T03:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to show computer in horizontal chart event if there are 0 events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610603#M50061</link>
      <description>&lt;P&gt;This is another way of appending the columns for any MISSING hosts entirely.&lt;/P&gt;&lt;P&gt;The first timechart + fillnull will create the gaps for all hosts found, but then the final appendcols will add in columns for any missing hosts&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=50
| eval _time=now()-((random() % 62) * 60)
| eval host=mvindex(split("hosta,hostb,hostc",","), random() % 3) 
| bin _time span=5m 
| stats count by _time,host
| eval count=if(count&amp;gt;0,1,0)
|timechart span=5m limit=0 last(count) by host
| fillnull
| appendcols [
  | makeresults
  | eval host=split("hosta,hostb,hostc,hostd",",")
  | mvexpand host
  | eval count=0
  | chart values(count) as count over _time by host
]
| filldown&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hopefully these will give you something to work with&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 04:06:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610603#M50061</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-08-24T04:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to show computer in horizontal chart event if there are 0 events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610608#M50062</link>
      <description>&lt;P&gt;That works for me! Many thanks&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 05:27:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-show-computer-in-horizontal-chart-event-if-there-are-0/m-p/610608#M50062</guid>
      <dc:creator>LyDang</dc:creator>
      <dc:date>2022-08-24T05:27:46Z</dc:date>
    </item>
  </channel>
</rss>

