Splunk Search

How to create a chart overlay of last weeks CPU utilization with this week's CPU utilization?

tmarlette
Motivator

I am attempting to overlay last weeks CPU with this weeks CPU utilization, to give a side by side contrast.

Currently, I have the following:

sourcetype="mySourcetype" earliest=-7d@d latest=now | eval ReportKey="ThisWeek" | append [search sourcetype="mySourcetype"  earliest=-14d@d latest=-7d@d| eval ReportKey="LastWeek"  ] | timechart span=1d avg(pctCPU) by ReportKey

Which produces this chart: (I substituted minutes for days in the chart so it wouldn't take long to load)

alt text

Is there a way I can make this go over the same 'time', so it looks like a true over lay? Meaning if I set this to a weekly, Mon - Fri kind of time range?

1 Solution

MuS
Legend

Hi tmarlette,

try the timewrap app https://splunkbase.splunk.com/app/1645/ it does exactly what you want.

cheers, MuS

View solution in original post

ramdaspr
Contributor

Or, you can shift time back for the second graph instead.
Refer a blog article covering this exact scenario

0 Karma

MuS
Legend

Hi tmarlette,

try the timewrap app https://splunkbase.splunk.com/app/1645/ it does exactly what you want.

cheers, MuS

Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...