Splunk Search

How do I make a rolling weekly percentage?

altinCamp
New Member

I'm new to splunk, but I need to figure out how to count the number of error codes of a certain type over a rolling 7 day span going back to the start of the year. so from 01/01/2020 to current date of search. broken down into rolling 7 day averages... so if its Wednesday it goes back to Thursday of the previous week, if it thursday it goes back to friday of the previous week and it goes all the way back to the beginning of the year but broken out into 7 day periods.  Is this possible with Splunk? 

Error_Code = "x" | timechart count span = 1d is as far as i've gotten

 

Labels (3)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
Error_Code = "x" 
| bin _time span=1d
| stats count by _time
| autoregress count p=1-6
| eval sevendaycount=count+count_p1+count_p2+count_p3+count_p4+count_p5+count_p6
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...