Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading Timewrap
SHA256 checksum (timewrap_24.tgz) cfb629c14cd2e9a4028356a68c71261d44689649732134a61fb35fcbbd448c25 SHA256 checksum (timewrap_23.tgz) d7c4682dded7a3d9f20b0e5fac55ee9290a91847454f7bb211fa564dfce8b5b3 SHA256 checksum (timewrap_22.tgz) 0068ec849eb2f78f5136f6987cae66227dad3108e2cf6c163c58c0aa487a5d5f SHA256 checksum (timewrap_21.tgz) 925687ee92b7916422cc341c5499f85b996c13221f10919cedffedc34fb8badc SHA256 checksum (timewrap_19.tgz) d2e17827df26e2579d1940c42bf4b3e707c36a242fb8814a039ba998b560473e SHA256 checksum (timewrap_18.tgz) bf5d1846f878f53b6015beab08b775fb3a82579d4700f9e166f3e763dd98075c SHA256 checksum (timewrap_17.tgz) 596528b32273103763740d299e362bdae0d1a4298017dfc718bc3f7f24bb93ee SHA256 checksum (timewrap_16.tgz) d7d6e184b560bfb570015ab68979e8d75b4e6239628db5b3e0164c373cc56bb6 SHA256 checksum (timewrap_15.tgz) eabcf40cfd277b172faa775b2aba0eb56ab15dbbb9789ca2f2c17ac2e8f20734 SHA256 checksum (timewrap_14.tgz) da6bcdcb725ca1d89c6a710745f0dfc5a996bf29560cca2874da56e0cac97756 SHA256 checksum (timewrap_13.tgz) e2813082d306b6d78ff67726d7c3da66fdfddab4ee6436fbb6ab49f5d628d04c SHA256 checksum (timewrap_12.tgz) 3f3d5111d7aad132214af9d61b7c425cdf42537b3448a1c73c7c977c075381dd SHA256 checksum (timewrap_11.tgz) 8f5b8f559497f8976445a00aa38830c748b580a840fd2756039d172d071ddc2a
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

Timewrap

Overview
Details
This small app gives you a new, convenient search command called "timewrap" that does it all, for arbitrary time periods. Compare week-over-week, day-over-day, month-over-month, quarter-over-quarter, year-over-year, or any multiple (e.g. two week periods over two week periods).

Just add "| timewrap w" after a 'timechart' command, and compare week-over-week. Or use 'h' (hour), 'w' (week), 'm' (month), 'q' (quarter), 'y' (year).

Beginning in version 6.5.0, the Timewrap command in this app is included in the Splunk search processing language: http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timewrap

"THIS IS AWESOME!"
"Now I don't need to twist my brain to get the week vs week graphs right."
"Cool thanks. Playing with timewrap now! Cool tool, especially for noobs"

David Carasso, Splunk’s Chief Mind, wrote this and many other apps, as well as the book Exploring Splunk. We still miss him http://blogs.splunk.com/2015/01/30/remembering-david/.

FAQ

Q: I'm searching last week, how come my weekly results seem to start on Monday?

A: This is not an error. Timewap relies on the timeframe of the search. You are searching for a 7 day window FROM sunday. That's mon,tues,wed,thurs,fri,sat,sun. If you want to start on Sunday, end your search on Saturday @w-1.

Q: I searched for day over day for a week, but I get 8 lines charted. Why not 7?

A: If you are searching last seven 24 hour periods, which will occur on 8 days, unless you start at midnight. If snap to the start of a day, this will go away.

Q: How can I compare Wednesdays to Wednesdays?

A: Do your search as usual, and filter at the end (filtering up-front will confuse timechart):

.... | timechart count span=1h | timewrap w | where strftime(_time, "%A") == "Wednesday"

Q: How can I change the names of the series?

A: There is now a new "series" option to determines the naming convention of the series names:

  • "relative" gives values like "latest_week", "1week_ago", "2weeks_ago", etc.;
  • "short" gives short span names like "s0", "s1", "s2", etc., which are useful if you need to modify the values with further search commands;
  • "exact" gives convenient values like "week_of_dec01", "week_of_nov24", etc.

"relative" is the default "series" value.

Q: How can I compare today to yesterday to the avg for the week?

Glad you asked. Search for the last 7 days and run this:

*  
| timechart count span=1h
| timewrap  d series=short
| addtotals s*
| eval 7dayavg=Total/7.0
| table _time, _span, s0, s1, 7dayavg
| rename s0 as now, s1 as yesterday

Basically, we're using timewrap over the last 7 days, and then using addtotals and eval to calculate the average over those 7 days. We then rename fields and cut out days 3-7, because we only wanted today, yesterday, and the weekly average.

Q: What is this 'drilldown' command you threw in for nothing?

Currently in Splunk you cannot drilldown into "other" values from a "top" command. For example, if you searched for "* | top 10 host useother=t", clicking on the "other" value will try to search for "host=other"(!), which is wrong.

I added a little search command that adds a _drilldown field that does the right thing -- it will search for "host=* NOT host=VAL1 NOT host=VAL2 ... NOT host=VAL3". It works with 'top' output.

In your simplexml, you'd then say drilldown on

     $row._drilldown$

This will drilldown on the _drilldown field value.

Release Notes

Version 2.4
July 23, 2014

added support for year, fixing bug.

Version 2.3
July 21, 2014

Added support for "y" year. Assumes 365 days, ignoring leap days.

Version 2.2
April 11, 2014

Added support for s (seconds). For example, an argument of "600s" will timewrap on 10minutes.

Version 2.1
Feb. 3, 2014

Added support for multidigit timespans (e.g. 19h).
Added 'drilldown' command (freebie!), that makes drilldown on 'other' values work.

Version 1.9
Dec. 24, 2013

Version 1.8
Dec. 12, 2013

Added series option to determines the naming convention of the series names: "relative" gives values like "latest_week", "1week_ago", "2weeks_ago", etc.; "short" gives short span names like "s0", "s1", "s2", etc., which are useful if you need to modify the values with further search commands; and "exact" gives convenient values like "week_of_dec01", "week_of_nov24", etc. "relative" is the default SERIES value.

Version 1.7
Dec. 10, 2013

Fixed bug where latesttime was being included, when it should have been excluded.
Improved the name of the series to be more correct and clear, and convenient (no whitespace).

Version 1.6
Dec. 4, 2013

Version 1.5
Dec. 3, 2013

Version 1.4
Dec. 2, 2013

now supports _span field for better time labeling

Version 1.3
Nov. 27, 2013

updated support for improved column ordering and not retaining events

Version 1.2
Nov. 26, 2013

made app invisible because it's just an add-on

Version 1.1
Nov. 26, 2013

updated support for multiple series

2,092
Installs
7,983
Downloads
Share Subscribe LOGIN TO DOWNLOAD

Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 50GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps and add-ons from Splunk, our partners and our community. Find an app or add-on for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
© 2005-2018 Splunk Inc. All rights reserved.
Splunk®, Splunk>®, Listen to Your Data®, The Engine for Machine Data®, Hunk®, Splunk Cloud™, Splunk Light™, SPL™ and Splunk MINT™ are trademarks and registered trademarks of Splunk Inc. in the United States and other countries. All other brand names, product names, or trademarks belong to their respective owners.