Splunk Search

How to use different time ranges in subsearch and main search ?

selvaraj4u
New Member

Hi, 
am creation a dashboard using dashboard studio, and i want to run a query with subsearch.
i want to use the time from the global time for sub search and a different time for main search how do i do it ?
i have configured an input field for time with token - global_time

my query looks like this 

index=xyz query1 earliest=global_time.earliest latest=now() [search index=xyz query2 earliest=global_time.earliest latest=global_time.latest]
this is not working - can you suggest how to make this work
Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @selvaraj4u,

I'm not sure on Dashboard Studio, but with Classic dashboards, you should try:

index=xyz query1 latest=now() [ search index=xyz query2 earliest=global_time.earliest latest=global_time.latest]

In other words, you shoud force the time borders different than Time Picker.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...