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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...