Splunk Search

Using a Token to set the earliest value in a multi index search

Steve_A200
Path Finder

Hi, 

I am trying to create a splunk classic dashboard, but struggling with setting the earliest values.

The goal is to run a search, and have the results pull data from 2 different index files while controlling the data pulled from the first index by a dropdown time parameter.

The SPL is part of a radio button option with the dashboard and starts as such:

( (index=first_index source="first_file_location" $time_range$ latest=-1d@d() ) OR
(index=second_index earliest=@d latest=now() source="second_file_location")
... rest of the SPL


time_range token is the dropdown input with a static value set to
earliest=-7d@d()


When I run the search, it is not substituting the static value into the search, and is populating it as the token name with the $ sign.

Would it be possible to set the earliest value for the first index using a dropdown menu.

Any assistance would be greatly appreciated.

Thanks

0 Karma
1 Solution

Steve_A200
Path Finder

I figured it out, the universal _time would be used by default when no earliest/latest parameters are specified.

 

View solution in original post

Steve_A200
Path Finder

I figured it out, the universal _time would be used by default when no earliest/latest parameters are specified.

 

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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...