Splunk Dev

Time Picker into Query

msachdeva3
Explorer

I have a query where I'm using

time() - _indextime,
1. but I want to be using what the user has selected from time range picker
2. if time picker local time is different from index time, how to make sure that is cordinated & used instead of what the server time.

Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

Use now() instead of time().

View solution in original post

0 Karma

woodcock
Esteemed Legend

Use now() instead of time().

0 Karma

somesoni2
Revered Legend

Without seeing your full search, to see what exact calculations are being performed, I can only say that, you can use command addinfo to get the value from timerange picker to your search result. Example,

index=_internal sourcetype=splunkd | addinfo | table _time info_min_time info_max_time 

The two (out of 4 total) fields that this command adds, info_min_time which contains the earliest and info_max_time contains the latest value of time range picker. See this for more information on this command.

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 ...