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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...