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

 

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...