<?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: draw a theshold line with predict in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468070#M30708</link>
    <description>&lt;P&gt;Moving filldown to after the predict worked like magic, thank you very much @niketnilay &lt;/P&gt;</description>
    <pubDate>Fri, 20 Dec 2019 03:54:22 GMT</pubDate>
    <dc:creator>ilya_resh</dc:creator>
    <dc:date>2019-12-20T03:54:22Z</dc:date>
    <item>
      <title>draw a theshold line with predict</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468064#M30702</link>
      <description>&lt;P&gt;HI,&lt;BR /&gt;
I have a graph that draws capacity and utilisation and predicts utilisation into the future.&lt;BR /&gt;
I want to draw a threshold line for capacity , but the threshold's could to be either&lt;BR /&gt;
- the latest value of the capacity, i.e straight line across the graph&lt;BR /&gt;
- the value of the capacity at the point of time , but no prediction to the future&lt;/P&gt;

&lt;P&gt;I am fine with either option as I just want to see when the predicted utilisation will "cross" the capacity threshold&lt;/P&gt;

&lt;P&gt;The threshold should be calculated, as I don't want to update the search/graph every time we change the capacity&lt;/P&gt;

&lt;P&gt;here is what i have, but as mentioned I want the threshold not to be predicted&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_introspection (host=idx*) component=Partitions 
| spath output=capacity path=data.capacity 
| spath output=available path=data.available 
| eval utilised=(capacity - available) / 1024 , capacity = capacity/ 1024
| search *cold 
| timechart span=1h max(utilised) as utilised_max p95(utilised) as utilised_p95 last(capacity) as capacity limit=100 
| predict utilised_max as predict_max utilised_p95 as predict_p95 capacity as capacity future_timespan=168 
| fields - upper95* lower95*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8104i82A9D8C647FD4831/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 23:03:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468064#M30702</guid>
      <dc:creator>ilya_resh</dc:creator>
      <dc:date>2019-12-18T23:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: draw a theshold line with predict</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468065#M30703</link>
      <description>&lt;P&gt;&lt;STRONG&gt;[UPDATED ANSWER]&lt;/STRONG&gt; Move the &lt;CODE&gt;| filldown Threshold&lt;/CODE&gt; to after the &lt;CODE&gt;predict&lt;/CODE&gt; command. Refer to updated answer below. Alternatively as suggested you can also change the chart Format to treat Null Values as connected. This is like applying filldown to all the series in the chart.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;@ilya_resh before prediction threshold, in order to improve your searh performance, you should move &lt;CODE&gt;*cold&lt;/CODE&gt; to the main search instead of &lt;CODE&gt;| search *cold&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Before the timechart command use eventstats to get the latest capacity as Threshold.&lt;BR /&gt;
After timechart you can use filldown command to draw the threshold line throughout (you can also use chart options for null values through dashboard edit option for the chart as well.)&lt;/P&gt;

&lt;P&gt;Please try out and confirm!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_introspection (host=*) component=Partitions "*cold"
| spath output=capacity path=data.capacity 
| spath output=available path=data.available 
| eval utilised=(capacity - available) / 1024 , capacity = capacity/ 1024 
| eventstats latest(capacity) as Threshold
| timechart span=1h latest(Threshold) as Threshold max(utilised) as utilised_max p95(utilised) as utilised_p95 last(capacity) as capacity limit=100
| predict utilised_max as predict_max utilised_p95 as predict_p95 capacity as capacity future_timespan=168 
| filldown Threshold
| fields - upper95* lower95*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Dec 2019 19:50:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468065#M30703</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-12-19T19:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: draw a theshold line with predict</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468066#M30704</link>
      <description>&lt;P&gt;Hi @niketnilay &lt;BR /&gt;
Here is the result&lt;/P&gt;

&lt;P&gt;You will see that the Threshold line ends at the current time point, but I want it to go all the way till the end of the predicted time period so that I can see when the predicted utilisation will cross the Threshold line.&lt;/P&gt;

&lt;P&gt;(had to post it as answer, as can't attach files from drive in comments)&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 01:52:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468066#M30704</guid>
      <dc:creator>ilya_resh</dc:creator>
      <dc:date>2019-12-20T01:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: draw a theshold line with predict</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468067#M30705</link>
      <description>&lt;P&gt;Hi @niketnilay&lt;BR /&gt;
Here is the result&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8103i91D70CBC658C2AA2/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;You will see that the Threshold line ends at the current time point, but I want it to go all the way till the end of the predicted time period so that I can see when the predicted utilisation will cross the Threshold line.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 01:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468067#M30705</guid>
      <dc:creator>ilya_resh</dc:creator>
      <dc:date>2019-12-20T01:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: draw a theshold line with predict</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468068#M30706</link>
      <description>&lt;P&gt;Thanks for the details. Please refer to updated answer below. All you need is to move the filldown command below predict.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 02:58:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468068#M30706</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-12-20T02:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: draw a theshold line with predict</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468069#M30707</link>
      <description>&lt;P&gt;Sure. Once you post image as answer, you can convert the same to comment. I have done that for you! Please try the updated answer and confirm!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 02:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468069#M30707</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-12-20T02:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: draw a theshold line with predict</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468070#M30708</link>
      <description>&lt;P&gt;Moving filldown to after the predict worked like magic, thank you very much @niketnilay &lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 03:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/draw-a-theshold-line-with-predict/m-p/468070#M30708</guid>
      <dc:creator>ilya_resh</dc:creator>
      <dc:date>2019-12-20T03:54:22Z</dc:date>
    </item>
  </channel>
</rss>

