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

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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...