Dashboards & Visualizations

+/- 30 minutes from timestamp of table on a dashboard

treverce
Explorer

I have a dashboard that generates a table that I would like to add the ability to jump into search from the table on the dashboard. We have hundreds of TB of data a day in the index so id like for it to limit the timeframe down to +/- 30m of the timestamp that I have. So if the timestamp of the event is 8:21pm I want to make the search be something like

```

index=index field=field earliest=(timestamp-30m) latest=(timestamp+30m)

```

How could I achieve this via the dashboard XML?

 

Thanks!

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

You can use eval to set tokens like this.

<drilldown>
  <eval token="st">$row._time$-1800</eval>
  <eval token="et">$row._time$+1800</eval>
</drilldown>

Then pass $st$ and $et$ to the drilldown dashboard. 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

You can use eval to set tokens like this.

<drilldown>
  <eval token="st">$row._time$-1800</eval>
  <eval token="et">$row._time$+1800</eval>
</drilldown>

Then pass $st$ and $et$ to the drilldown dashboard. 

---
If this reply helps you, Karma would be appreciated.
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...