Splunk Search

How come the timewrap command is displaying today's results and not from the value of the day in the timemodifier?

ppokhrel
New Member

I am using the search below to get a week over week results using Timewrap, but the results shown are from today and not from the day mentioned in the "latest" time modifier (Green line on the chart below).

| mstats sum(foo) as "count" where index=test earliest=-14d@w1 latest=@w1 span=1d
| timechart sum(count) as Exceptions span=1d
| timewrap w

alt text

If the timewrap command is removed then timechart displays the results for the correct time period.

Thank you

0 Karma

cpetterborg
SplunkTrust
SplunkTrust

Since our data is not your data, what do you have for the results with the time wrap that is not what you want, but right in the result without the timewrap? Perhaps a screenshot of the latter?

0 Karma

efavreau
Motivator

When I tried to reproduce it, I saw @w1 includes today. Try different values to get what you are looking for such as:
earliest=-14d@d-1 latest=@d-1
earliest=-2w@w latest=@w

###

If this reply helps you, an upvote would be appreciated.
0 Karma

woodcock
Esteemed Legend

What version of splunk are you on? I am not seeing this when I use this similar run-anywhere search, which always works no matter what w# I use:

index=_* earliest=-14d@w1 latest=@w1
| bin _time span=1d 
| stats count BY _time 
| timechart sum(count) AS Exceptions span=1d 
| timewrap w
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!

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 ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...