so I have this query that detects anomalies in the errors from a specific source based on the mean absolute value of the residual around the median. but my question is does the predict command and the algorithm that I used accounts for the fluctuations of event counts over the weekend the weekends. because with less users using the product over the weekend hence less errors.
index=summary source=some index
mslevel=ERROR OR mslevel=error
| sort -time
| predict count as prediction algorithm=LLP futuretimespan=200 holdback=0
| eval prediction=round(prediction,0)
| eval residual= count - prediction
| streamstats window=400 current=true median(residual) as median
| eval absdev=(abs(residual- median ))
| streamstats window=400 current=true median(absdev) as medianabsdev
| eval upperbound=(median + medianabsdev * 30)
| eval lowerbound=(median - medianabsdev * 30)
| eval outlier=if(residual > upperbound OR residual < lowerbound,1,0)
| table _time,event residual, upperbound
It should take into account the "seasonality" trend since you are using LLP.
Predict is generally followed by timechart, but i'm not sure what you're data looks like or what the exact output is. if you remove everything after predict and just look at the chart, can you see the predictions fluctuating as expected? if you use timechart before predict and span=1d or whatever span you need, does that change the prediction?