Splunk Search

Do predict and timeswrap mix?

splunkernator
Path Finder

Hi forum!

getting a bit muddled here, I want to statistically demonstrate a recurring weekly trend , so timewrap sounds great.  Then again I want to work out a 95% variation of this, so predict sounds awesome.

I want to do this so that I can hopefully create an action (alert) condition based on overlaying this variance on a real time data series: enabling me (hopefully) to answer the question "is this normal or not?"

When I look at what the two commands do, they seem to want to do different things - I mean how can you predict a timewrap that circles back by design?  So splunk - understandably errors - an I ask for forgiveness of my bad logic 🙂

Can anyone give me any advice?

Tags (2)
0 Karma

johnhuang
Motivator

For weekly/seasonality trends, you can set the algorithm to LLP. Let's say you're trying to predict the number of events by day of the week, you set your span=1d and your period to 7 (which is 7 days)

 

| tstats count WHERE (index=_internal sourcetype=splunkd_access earliest=-4w@w latest=-0d@d) by _time sourcetype span=1d
| timechart span=1d sum(count) AS event_ct
| predict event_ct algorithm=LLP period=7

 

Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...