Splunk Search

How do you use timewarp in specific?

phamxuantung
Communicator

Let's say I have this query

 

index = x 
|stats count as Total, sum(AMMOUNT) as TAmmount BY MERCHANT, SUBMERCHANT

 

I want to make a comparison by percentage between this month to the average of TOTAL three month ago. How do you go about using timewarp to  archive that goal?

Labels (2)
0 Karma

tread_splunk
Splunk Employee
Splunk Employee

You can adapt this.  I don't have months of data on my laptop.  So I've produced a chart with 2 lines.  One line is the last minute of activity (count of events per second), the other line is the average activity based on the 4 minutes before that.

index=_internal sourcetype=splunkd component=Metrics earliest=-5min@min latest=@min
| timechart span=1s count
| eval latestMinute=if(_time>=relative_time(now(),"-1m@m"),"LatestMinute","Average"), sec=strftime(_time,"%S")
| chart avg(count) over sec by latestMinute
0 Karma

PickleRick
SplunkTrust
SplunkTrust

For timewrap you need results of timechart.

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