<?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: Two predictions (Day and Night) in one report in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534332#M36423</link>
    <description>&lt;P&gt;please use &lt;STRONG&gt;append&lt;/STRONG&gt;&amp;nbsp;with two search.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Dec 2020 11:19:52 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-12-29T11:19:52Z</dc:date>
    <item>
      <title>Two predictions (Day and Night) in one report</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534321#M36418</link>
      <description>&lt;P&gt;Hello Splunk community,&lt;/P&gt;&lt;P&gt;I need to do one prediction for two different time ranges in different span in one report.&lt;BR /&gt;The objective is making alert on the prediction of rate of messages: 1- from 5 am to10pm (span=10min) and 2- from 10pm to 5am (span=20 min).&lt;/P&gt;&lt;P&gt;It can be really easy, but as I'm new to Splunk, I couldn't find a proper way for it.&lt;/P&gt;&lt;P&gt;My base query is:&lt;/P&gt;&lt;P&gt;|tstats latest(msg) as msg where `sws_logs_indexes` sourcetype=sws:sag:msgpartners host="p*" mp_name="Bessserver*" sag_instance="*SAG12" by _time sag_instance mp_name span=10m&lt;BR /&gt;| stats sum(msg) as msg by _time sag_instance&lt;BR /&gt;| streamstats current=false latest(msg) as previous_msg by sag_instance&lt;BR /&gt;| eval rate=msg-previous_msg&lt;BR /&gt;| timechart span=10m avg(rate) as "Server msg rate"&lt;BR /&gt;&lt;BR /&gt;| predict "Server msg rate" as prediction algorithm=LLP5 holdback=0 future_timespan=0 period=1008 upper75=upper75 lower75=lower75&lt;BR /&gt;|`forecastviz(24, 0, "Server msg rate", 75)`&lt;/P&gt;&lt;P&gt;| eval isOutlier = if(prediction!="" AND 'Server msg rate' != "" AND ('Server msg rate' &amp;lt; 'lower75(prediction)' OR 'Server msg rate' &amp;gt; 'upper75(prediction)'), 1, 0) | where isOutlier=1 |table _time,isOutlier&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 10:23:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534321#M36418</guid>
      <dc:creator>maryambagherik</dc:creator>
      <dc:date>2020-12-29T10:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Two predictions (Day and Night) in one report</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534324#M36420</link>
      <description>&lt;P&gt;We don't understand anything even if you only give us SPL.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 10:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534324#M36420</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-12-29T10:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Two predictions (Day and Night) in one report</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534330#M36422</link>
      <description>&lt;P&gt;You imagine very simple search like:&lt;/P&gt;&lt;P&gt;|index=*&lt;BR /&gt;|&amp;nbsp;timechart span=10 min count as "Errors" (from 5am to 10 pm)&lt;/P&gt;&lt;P&gt;|predict "Errors"&lt;BR /&gt;&lt;BR /&gt;|index=*&lt;/P&gt;&lt;P&gt;|&amp;nbsp;timechart span=20 min count as "Errors" (from 10pm to 5am)&lt;/P&gt;&lt;P&gt;|predict "Errors"&lt;BR /&gt;&lt;BR /&gt;How can I do such a search in one search?&lt;/P&gt;&lt;P&gt;is it possible in splunk two time spans for one search?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 11:18:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534330#M36422</guid>
      <dc:creator>maryambagherik</dc:creator>
      <dc:date>2020-12-29T11:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Two predictions (Day and Night) in one report</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534332#M36423</link>
      <description>&lt;P&gt;please use &lt;STRONG&gt;append&lt;/STRONG&gt;&amp;nbsp;with two search.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 11:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534332#M36423</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-12-29T11:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Two predictions (Day and Night) in one report</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534342#M36430</link>
      <description>&lt;P&gt;Append doesn't work, as I have tstats command, and this command should be the first command, then in the 2nd search it returns an error.&amp;nbsp;&lt;BR /&gt;Then Append doesn't work in realtime well, and as I have prediction in my search....&lt;/P&gt;&lt;P&gt;Do you have any other suggestion or example?&lt;/P&gt;&lt;P&gt;Further, for the time mentioning in each search i do sth like:&amp;nbsp;WHERE ((earliest=-24h latest&amp;lt;@d) OR (earliest&amp;gt;=@d+1h)), it returns 0 results, however it shouldn't be 0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 12:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534342#M36430</guid>
      <dc:creator>maryambagherik</dc:creator>
      <dc:date>2020-12-29T12:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Two predictions (Day and Night) in one report</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534365#M36432</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal earliest=0 latest=-1w@w by _time span=1h
| eval status="last_week"
| append [ | tstats count where index=_internal earliest=-1w@w by _time span=1h | eval status="current_week"]
| timechart avg(count) by status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt; append doesn't work&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Have you tried it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 14:34:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534365#M36432</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-12-29T14:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Two predictions (Day and Night) in one report</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534371#M36434</link>
      <description>&lt;P&gt;I could use append, without prediction command, it works.&lt;BR /&gt;But how about its visualization? how can i define two different colours for two searches?&lt;/P&gt;&lt;P&gt;Now i see the results of 2nd search after append in the same col as the 1st search (span=10m), is there anyway to see the second search (span=20) in separate col?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Further, When i do prediction, then again append doesn't work results for the 2nd search. Do you know why?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 15:36:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534371#M36434</guid>
      <dc:creator>maryambagherik</dc:creator>
      <dc:date>2020-12-29T15:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Two predictions (Day and Night) in one report</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534391#M36437</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal earliest=-2w@w latest=-1w@w by _time span=1h | eval status="last_week"
| append [ | tstats count where index=_internal earliest=-1w@w by _time span=1h | eval status="current_week" ]
| makecontinuous _time span=1h
| filldown count status
| xyseries _time status count
| bin span=1d _time
| stats avg(*) as * by _time
| predict current_week last_week
| where match(_time,"^\d+$")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 21:48:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Two-predictions-Day-and-Night-in-one-report/m-p/534391#M36437</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-12-29T21:48:13Z</dc:date>
    </item>
  </channel>
</rss>

