<?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 add custom name in chart viz for empty space in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-custom-name-in-chart-viz-for-empty-space/m-p/505173#M33485</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I got requirement where we need to display custom name like "maintenance" during planned activity when there will be no data and while displaying in chart currently its empty space, but needed to display as maintenance as custom word. I tried with fillnull it doesn't show in chart but in table it does.&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=myindex source=mysource status=*&lt;BR /&gt;| timechart count as total, count(eval(status=="PASS")) as Success,count(eval(status=="Fail")) as Failure&lt;BR /&gt;| eval PF=round((Failure/total)*100), "Success%"=round((100-PF))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please let me know any suggestions to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Pavan&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jun 2020 12:14:15 GMT</pubDate>
    <dc:creator>kpavan</dc:creator>
    <dc:date>2020-06-19T12:14:15Z</dc:date>
    <item>
      <title>add custom name in chart viz for empty space</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-custom-name-in-chart-viz-for-empty-space/m-p/505173#M33485</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I got requirement where we need to display custom name like "maintenance" during planned activity when there will be no data and while displaying in chart currently its empty space, but needed to display as maintenance as custom word. I tried with fillnull it doesn't show in chart but in table it does.&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=myindex source=mysource status=*&lt;BR /&gt;| timechart count as total, count(eval(status=="PASS")) as Success,count(eval(status=="Fail")) as Failure&lt;BR /&gt;| eval PF=round((Failure/total)*100), "Success%"=round((100-PF))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please let me know any suggestions to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Pavan&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 12:14:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-custom-name-in-chart-viz-for-empty-space/m-p/505173#M33485</guid>
      <dc:creator>kpavan</dc:creator>
      <dc:date>2020-06-19T12:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: add custom name in chart viz for empty space</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-custom-name-in-chart-viz-for-empty-space/m-p/505390#M33512</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49826"&gt;@kpavan&lt;/a&gt;&amp;nbsp;you have following 2 options:&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Option 1 : Splunk built in Chart Event Annotation&lt;/STRONG&gt;&lt;/U&gt;:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartEventAnnotations" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartEventAnnotations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-06-22 at 11.26.41 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9289i77D83FED05D76763/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-06-22 at 11.26.41 PM.png" alt="Screen Shot 2020-06-22 at 11.26.41 PM.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Option 2 : Region Chart Custom Visualization by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/121148"&gt;@chrisyounger&lt;/a&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;U&gt;&lt;STRONG&gt;&amp;nbsp;:&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;A href="https://splunkbase.splunk.com/app/4911/" target="_blank"&gt;https://splunkbase.splunk.com/app/4911/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-06-22 at 11.26.27 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9290i8E5D7D07D2371893/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-06-22 at 11.26.27 PM.png" alt="Screen Shot 2020-06-22 at 11.26.27 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Following is a run anywhere example for both examples above. The example assumes maintenance window every Sunday from 8:00 PM to midnight.&lt;/P&gt;&lt;P&gt;PS: For the second option to work you would need to get &lt;A href="https://splunkbase.splunk.com/app/4911/" target="_self"&gt;Region Chart&lt;/A&gt; custom visualization from Splunkbase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard theme="light"&amp;gt;
  &amp;lt;label&amp;gt;Maintenance Window&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Option 1: Maintenance Window using Splunk Chart Event Annotation&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search type="annotation"&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| addinfo
| eval _time=split($tokEarliestTime|s$."|".$tokLatestTime|s$,"|")
| stats count by _time
| timechart count span=1h
| fields - count
| eval isMaintenanceWindow=if(strftime(_time,"%a")=="Sun" AND tonumber(strftime(_time,"%H"))&amp;amp;gt;20,"Maintenance Window Sunday 8:00 PM - 11:59 PM","Regular")
| search isMaintenanceWindow="Maintenance Window Sunday 8:00 PM - 11:59 PM"
| eval annotation_label=isMaintenanceWindow&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level=WARN
| timechart count as ERRORS span=1h
| fillnull value=0 ERRORS&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15d@d&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
          &amp;lt;progress&amp;gt;
            &amp;lt;eval token="tokEarliestTime"&amp;gt;strptime($job.earliestTime$,"%Y-%m-%dT%H:%M:%S.%3N%z")&amp;lt;/eval&amp;gt;
            &amp;lt;eval token="tokLatestTime"&amp;gt;strptime($job.latestTime$,"%Y-%m-%dT%H:%M:%S.%3N%z")&amp;lt;/eval&amp;gt;
          &amp;lt;/progress&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;!-- Secondary search that drives the annotations --&amp;gt;
        &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;collapsed&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;collapsed&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel id="panel_chart_error_trend"&amp;gt;
      &amp;lt;title&amp;gt;Option 2: Maintenance Window using Region Chart Custom Visualization&amp;lt;/title&amp;gt;
      &amp;lt;viz type="region_chart_viz.region_chart_viz"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;progress&amp;gt;
            &amp;lt;eval token="tokEarliestTime"&amp;gt;strptime($job.earliestTime$,"%Y-%m-%dT%H:%M:%S.%3N%z")&amp;lt;/eval&amp;gt;
            &amp;lt;eval token="tokLatestTime"&amp;gt;strptime($job.latestTime$,"%Y-%m-%dT%H:%M:%S.%3N%z")&amp;lt;/eval&amp;gt;
          &amp;lt;/progress&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level=WARN
| timechart count as ERRORS span=1h
| fillnull value=0 ERRORS
| eval regions=if(strftime(_time,"%a")=="Sun" AND tonumber(strftime(_time,"%H"))&amp;amp;gt;20,"Maintenance Window Sunday 8:00 PM - 11:59 PM=red","")&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15d@d&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/viz&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 18:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-custom-name-in-chart-viz-for-empty-space/m-p/505390#M33512</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-06-22T18:05:01Z</dc:date>
    </item>
  </channel>
</rss>

