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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...