Splunk Search

How do I constrain a timechart's x-axis range, but still predict on more values than are displayed?

j_williams
Explorer

Hello,

Using Splunk Enterprise 6.2

I am running a prediction using 30+ historical days of data to predict the next 24 hours of a week day of a particular transaction's volume.

When creating the timechart, I do not want to show all 30+ days of data, but I still want to leverage that data in the prediction for the next 24-hour period. I need to limit the displayed time range to something like earliest=-48 and latest=+24h, constantly rolling around the time period of "now".

I am not having any luck with XML edits, such as "charting.axisX.minimumTime"/"charting.axisX.maximumTime".

Thanks,

-J

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

After your timechart and predict, you can add | where _time >= relative_time(now(), "-48h") to filter the results.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

After your timechart and predict, you can add | where _time >= relative_time(now(), "-48h") to filter the results.

j_williams
Explorer

Perfect, thank you for the prompt response!
I am double checking to make sure there are no discrepancies with/without the |where comment above, but prelim is showing exactly what I needed.

0 Karma

j_williams
Explorer

yup, matched fine. Thanks again.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...