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
Get Updates on the Splunk Community!

The Payment Operations Wake-Up Call: Why Financial Institutions Can't Afford ...

The same scenario plays out across financial institutions daily. A payment system fails at 11:30 AM on a busy ...

Make Your Case: A Ready-to-Send Letter for Getting Approval to Attend .conf25

Hello Splunkers, Want to attend .conf25 in Boston this year but not sure how to convince your manager? We've ...

Community Spotlight: A Splunk Expert's Journey

In the world of data analytics, some journeys leave a lasting impact not only on the individual but on the ...