Getting Data In

Help on an input time token

jip31
Motivator

Hello

I use an input time token called "timepicker"

<earliest>$timepicker.earliest$</earliest>
        <latest>$timepicker.latest$</latest>

 Is there a way to call this input time token directly in my search ?

Someting like this :

Index=toto sourcetype=tutu earliest=$timepicker$ latest=$timepicker$ 

Thanks 

 

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

If you have to use two different time windows then you'll need two base searches.

If you really want to use a single base search then you'll have to use only one time window.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

jip31
Motivator

Is anybody can help please?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Reference the tokens in the search the same way they are referenced the Simple XML.

---
If this reply helps you, Karma would be appreciated.
0 Karma

jip31
Motivator

right, it works

earliest=$timesource.earliest$ latest=$timesource.latest$

But is it possible to add this token somewhere else than just after the index and the sourcetype?

for example, this doesnt works

| search earliest=$timesource.earliest$ latest=$timesource.latest$
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please explain what you mean by "this doesnt works".  What results do you get compared to what you expect?

Depending on what is in your query prior to the search command, you may be running into the known limitation described at https://docs.splunk.com/Documentation/Splunk/8.2.4/SearchReference/Search#Using_the_search_command_l....

---
If this reply helps you, Karma would be appreciated.
0 Karma

jip31
Motivator

In my dashboard i use 2 input time tokens

I also use 2 base search in order to display data in 2 table panels

These 2 table panels refer to the 2 input time token 

As the search are the same i want to use just one base search instead two

Actually i use 2 base search due to the 2 différents input time token

The problem is that in my base search i cant refer to 2 différent input time token

So i search a way to use just one base search with 2 input time tokens...

0 Karma

richgalloway
SplunkTrust
SplunkTrust

If you have to use two different time windows then you'll need two base searches.

If you really want to use a single base search then you'll have to use only one time window.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Mastering Threat Intelligence in ES 8.5, Splunk AI Assistant v2, and More from Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Break the Build: Inside the KubeDoom Lounge at .conf26

    You step up to the machine. The pixelated corridors of a certain 1993 FPS load in front of you, EMP Pulse ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...