Splunk Search

Dynamic Baseline for Timechart

tpederson
Path Finder

I need help building a chart that has a dynamic baseline based on the last 30 days of data. Over that baseline, I would put values from the last ten days.

I dont have the karma to post the mock-up image I made, but I can try to represent the data I would like in a table.

        avg(Elapsed)    perc90(elapsed) 30dAvgElapsed   30dPerc90Elapsed
1-Aug       0.19        0.22        0.22        0.25
2-Aug       0.35        0.38        0.22        0.25
3-Aug       0.27        0.30        0.22        0.25
4-Aug       0.22        0.25        0.22        0.25
5-Aug       0.18        0.21        0.22        0.25
6-Aug       0.21        0.24        0.22        0.25
7-Aug       0.25        0.28        0.22        0.25
8-Aug       0.32        0.35        0.22        0.25
9-Aug       0.11        0.14        0.22        0.25
10-Aug      0.10        0.13        0.22        0.25

So, the avg(elapsed) and perc90(elapsed) would be variable, but the 30d avg and perc90 would be straight lines on a line chart. This would let me see if our times in the last ten days were deviating significantly from our numbers in the last 30 days.

I tried to use appendcols and a subsearch for the 30 day numbers. But, I couldn't get the same numbers to fill those columns and make a baseline across the chart.

How is this done?

Tags (1)
0 Karma
1 Solution

HiroshiSatoh
Champion

But what about such a feeling? Please adjust the fine format.

(ex.)
index=* earliest=-30d@d latest=@d|eval Day=strftime(_time,"%Y-%m-%d")|stats avg(elapsed) as avg(Elapsed), perc90(elapsed) as perc90(elapsed) by Day|eval ID=1|join ID [search index=* earliest=-30d@d latest=@d |stats avg(elapsed) as 30dAvgElapsed, perc90(elapsed) as 30dPerc90Elapsed|eval ID=1]

View solution in original post

HiroshiSatoh
Champion

But what about such a feeling? Please adjust the fine format.

(ex.)
index=* earliest=-30d@d latest=@d|eval Day=strftime(_time,"%Y-%m-%d")|stats avg(elapsed) as avg(Elapsed), perc90(elapsed) as perc90(elapsed) by Day|eval ID=1|join ID [search index=* earliest=-30d@d latest=@d |stats avg(elapsed) as 30dAvgElapsed, perc90(elapsed) as 30dPerc90Elapsed|eval ID=1]

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Where Innovation Takes Flight: The Splunk4Aviation Flight Sim Lands at .conf26

If you hear someone at .conf26 shouting "gear down, GEAR DOWN" across the show floor, you have found us.  The ...

Turn Cisco Telemetry Into Action with Cisco Data Fabric, powered by the Splunk ...

The surge in machine data is already hitting enterprise budgets, and the agentic era will only intensify it. ...

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...