<?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: Is there a way to specify a different time range for predict? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398197#M26071</link>
    <description>&lt;P&gt;This is a good use case for an accelerated report, accelerated data model or a summary index.  If your report is going to  be based on summarized 15m increments, then it makes more sense for the system to be calculating each 15m increment once, rather than going back two months to do so.&lt;/P&gt;

&lt;P&gt;Start with accelerating the report, which should work for your use case.&lt;/P&gt;

&lt;P&gt;ACCELERATED REPORT&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.2/Report/Acceleratereports"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.2/Report/Acceleratereports&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;ACCELERATED DATA MODEL&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Acceleratedatamodels"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Acceleratedatamodels&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;SUMMARY INDEXING&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.2/Knowledge/Usesummaryindexing"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.2/Knowledge/Usesummaryindexing&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://www.splunk.com/view/SP-CAAACZW"&gt;https://www.splunk.com/view/SP-CAAACZW&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Aug 2018 19:20:28 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2018-08-09T19:20:28Z</dc:date>
    <item>
      <title>Is there a way to specify a different time range for predict?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398196#M26070</link>
      <description>&lt;P&gt;I know that the predict functions become more accurate when you feed it more data but I don't want to be querying 2 months worth of data in a dashboard that would take like 2 mins to load. Is there a way to get a more accurate prediction without actively querying the past 2 months? or is there a way to do this differently with a different function.  FYI  I d not have authority to download the MLTK&lt;/P&gt;

&lt;P&gt;I know this is a tough question but would like to hear some ideas.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary source="summary_events_2" 
orig_source=/var/log/pnr*
ms_region=us-west-1
ms_level=E*
| timechart span=15m  sum(count) as count 
| predict count as count_prediction period=7 algorithm=LLP5 future_timespan=10 holdback=0 upper50=high_prediction lower5=low_prediction
| rename high_prediction(count_prediction) as high_prediction
| eval deviation=count-round(count_prediction,0)
| streamstats window=300 current=true median(deviation) as median_of_residual
| eval abs_dev=(abs(deviation - median_of_residual))
| streamstats window=300 current=true median(abs_dev) as median_abs_dev
| eval upper_bound=if(median_of_residual + median_abs_dev * 5 &amp;lt; 0,abs(median_of_residual + median_abs_dev), median_of_residual + median_abs_dev * 5) 
| eval anomaly=if(deviation &amp;gt; upper_bound,1,0)
| predict deviation as deviation_prediction period=7 algorithm=LLP5 future_timespan=0 holdback=0 upper20=high_prediction lower20=low_prediction
| fields -  median_of_residual, median_abs_dev, abs_dev, high_prediction, bounds, count, count_prediction
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 18:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398196#M26070</guid>
      <dc:creator>kiamco</dc:creator>
      <dc:date>2018-08-09T18:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to specify a different time range for predict?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398197#M26071</link>
      <description>&lt;P&gt;This is a good use case for an accelerated report, accelerated data model or a summary index.  If your report is going to  be based on summarized 15m increments, then it makes more sense for the system to be calculating each 15m increment once, rather than going back two months to do so.&lt;/P&gt;

&lt;P&gt;Start with accelerating the report, which should work for your use case.&lt;/P&gt;

&lt;P&gt;ACCELERATED REPORT&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.2/Report/Acceleratereports"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.2/Report/Acceleratereports&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;ACCELERATED DATA MODEL&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Acceleratedatamodels"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Acceleratedatamodels&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;SUMMARY INDEXING&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.2/Knowledge/Usesummaryindexing"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.2/Knowledge/Usesummaryindexing&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://www.splunk.com/view/SP-CAAACZW"&gt;https://www.splunk.com/view/SP-CAAACZW&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 19:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398197#M26071</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-08-09T19:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to specify a different time range for predict?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398198#M26072</link>
      <description>&lt;P&gt;I agree with @DalJeanis.  In particular, if this is the only search like this, report acceleration is the easiest and best option for you.  If you could use MLTK, you could do a one-time learning over a huge time span and true this up periodically, but that's out.  Also, check out this INCREDIBLE answer by @mmodestino here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html"&gt;https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 20:47:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398198#M26072</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-08-09T20:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to specify a different time range for predict?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398199#M26073</link>
      <description>&lt;P&gt;i thought of using a summary index also but if run a summary index every 15m wouldn't it affect the accuracy of the predict. for example a query with predict that runs for 2 months would get a more accurate prediction compared to a 4 hours prediction, or am I misunderstanding the predict command. I am not sure however hoe the accelerated report works. I have read the documentation but I don't really know how that would solve my issue.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 20:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398199#M26073</guid>
      <dc:creator>kiamco</dc:creator>
      <dc:date>2018-08-09T20:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to specify a different time range for predict?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398200#M26074</link>
      <description>&lt;P&gt;@mmodestino explained it so well Thankss!!!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 23:10:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398200#M26074</guid>
      <dc:creator>kiamco</dc:creator>
      <dc:date>2018-08-09T23:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to specify a different time range for predict?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398201#M26075</link>
      <description>&lt;P&gt;this is even better&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.splunk.com/blog/2018/01/19/cyclical-statistical-forecasts-and-anomalies-part-1.html"&gt;https://www.splunk.com/blog/2018/01/19/cyclical-statistical-forecasts-and-anomalies-part-1.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://www.splunk.com/blog/2018/02/05/cyclical-statistical-forecasts-and-anomalies-part-2.html"&gt;https://www.splunk.com/blog/2018/02/05/cyclical-statistical-forecasts-and-anomalies-part-2.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://www.splunk.com/blog/2018/03/20/cyclical-statistical-forecasts-and-anomalies-part-3.html"&gt;https://www.splunk.com/blog/2018/03/20/cyclical-statistical-forecasts-and-anomalies-part-3.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;3 part blog series by much smarter folks than me &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 00:28:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398201#M26075</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2018-08-10T00:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to specify a different time range for predict?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398202#M26076</link>
      <description>&lt;P&gt;@kiamco -    The summary index would contain the pre-summarized data.  The predict could then run quickly across any length of time, and would not have to analyze the data at the event level ever again, which is what takes the majority of the CPU time.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 02:32:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-way-to-specify-a-different-time-range-for-predict/m-p/398202#M26076</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-08-10T02:32:22Z</dc:date>
    </item>
  </channel>
</rss>

