<?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 empty timechart with global_time date range in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618147#M214841</link>
    <description>&lt;P&gt;For your example, there's an easy solution. Run fillnull:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;| eval status = case(match(log,"(?i).*successfully.*"),"Success", match(log,".*"),"Failed")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| table _time, status&lt;/EM&gt;&lt;BR /&gt;&lt;STRONG&gt;| fillnull value=0 status&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2022 15:08:29 GMT</pubDate>
    <dc:creator>johnhuang</dc:creator>
    <dc:date>2022-10-24T15:08:29Z</dc:date>
    <item>
      <title>How can I show empty timechart with global_time date range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/617964#M214771</link>
      <description>&lt;P&gt;I have three graphs that show results based on a global time range.&lt;BR /&gt;However, if I have no results (no errors) the third graph is not displayed.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vmpj_0-1666350521205.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22111i47E13839373F9CD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vmpj_0-1666350521205.png" alt="vmpj_0-1666350521205.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I just want to display an empty graph with the same date ranges as the other graphs without displaying artificially inserted results that could be intepreted as errors.&lt;BR /&gt;&lt;BR /&gt;None of the many posts regarding this issue solved my problem as far as I understand it.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 14:44:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/617964#M214771</guid>
      <dc:creator>vmpj</dc:creator>
      <dc:date>2022-10-21T14:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Show empty timechart with global_time date range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/617988#M214786</link>
      <description>&lt;P&gt;What's the search query?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 14:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/617988#M214786</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-21T14:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Show empty timechart with global_time date range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618142#M214838</link>
      <description>&lt;P&gt;Something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="applications-esl" 
| spath input=properties.message
| rename message.id as s4-uuid
| eval _time=strptime(time, "%FT%T.%QZ")
| sort +_time limit=0
| stats 
  last(_time) as _time,
  list(logMsg) as log,
  by s4-uuid
| eval status = case(match(log,"(?i).*successfully.*"),"Success", match(log,".*"),"Failed")
| table _time, status
| search status="Success"
| timechart span=1m count&lt;/LI-CODE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 14:30:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618142#M214838</guid>
      <dc:creator>vmpj</dc:creator>
      <dc:date>2022-10-24T14:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Show empty timechart with global_time date range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618144#M214839</link>
      <description>&lt;P&gt;Put another way;&lt;/P&gt;&lt;P&gt;If I select a time range that does not contain any events,&lt;BR /&gt;how can I still see a graph for the selected time range, even though it does not contain any data?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 14:38:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618144#M214839</guid>
      <dc:creator>vmpj</dc:creator>
      <dc:date>2022-10-24T14:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Show empty timechart with global_time date range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618147#M214841</link>
      <description>&lt;P&gt;For your example, there's an easy solution. Run fillnull:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;| eval status = case(match(log,"(?i).*successfully.*"),"Success", match(log,".*"),"Failed")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| table _time, status&lt;/EM&gt;&lt;BR /&gt;&lt;STRONG&gt;| fillnull value=0 status&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 15:08:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618147#M214841</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-24T15:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Show empty timechart with global_time date range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618223#M214860</link>
      <description>&lt;P&gt;I can see how &lt;FONT face="andale mono,times"&gt;fillnull&lt;/FONT&gt; would be helpful if some events did not have a status value.&lt;BR /&gt;However, that is not the problem I'm trying to solve.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is a simplified scenario where the status is set for all events:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="applications-esl" 
| eval status = "Success"
| table _time, status&lt;/LI-CODE&gt;&lt;P&gt;But there are no events, in the time range selected, there is nothing to fill.&lt;BR /&gt;In this case I just get a "&lt;SPAN&gt;No results found. Try expanding the time range." when I really want an empty graph that reflects the selected time range on the x-axis.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 09:37:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618223#M214860</guid>
      <dc:creator>vmpj</dc:creator>
      <dc:date>2022-10-25T09:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Show empty timechart with global_time date range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618242#M214863</link>
      <description>&lt;P&gt;Ok, this should work. Note the trick is to set event_ct=1 for real data and event_ct=0 for fake data, then generate fake data if there aren't any results. When you summarize it, you would use sum(event_ct) instead of count.&lt;/P&gt;&lt;P&gt;&amp;lt;base_search&amp;gt;&lt;BR /&gt;&lt;STRONG&gt;| eval event_ct=1&lt;/STRONG&gt;&lt;BR /&gt;| appendpipe [stats count | addinfo | eval _time=info_max_time&lt;BR /&gt;| where count=0 | eval event_ct=0 | fields _time event_ct]&lt;BR /&gt;| timechart span=10m &lt;STRONG&gt;sum(event_ct) AS event_ct&lt;/STRONG&gt;&lt;BR /&gt;| fillnull value=0 event_ct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt;
| eval event_ct=1
| appendpipe [stats count | addinfo | eval _time=info_max_time 
| where count=0 | eval event_ct=0 | fields _time event_ct] 
| timechart span=10m sum(event_ct) AS event_ct
| fillnull value=0 event_ct&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 13:26:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-show-empty-timechart-with-global-time-date-range/m-p/618242#M214863</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-25T13:26:35Z</dc:date>
    </item>
  </channel>
</rss>

