Splunk Search

How to input a single epoch time from a dashboard URL as a time range inside the time picker


Hey gang,
I have an external system which can call a dashboard URL - but it can only supply a single epoch time
How do I use a dashboard to turn that time into a time range?

I tried making a new "text input" and use the "text input's" token in the URL to input the epoch time,
then I used a tag inside the "text input" to update my time picker by adding and subtracting 15 mins to the supplied epoch time. The problem with this approach is that the time picker dosent update as soon as the URL loads since my manipulation is done inside a change tag.
Can anyone help me out please?
Thank you.
Here's my XML:

 <input type="time" token="time_pick" searchWhenChanged="true">
      <label>Time range</label>
    <input type="text" token="trigger_time">
        <eval token="time_pick.earliest">$trigger_time$ - 900</eval>
        <eval token="time_pick.latest">$trigger_time$ + 900</eval>

Ultra Champion
  <label>Search by input text of epoch time</label>
  <fieldset submitButton="false">
    <input type="text" token="time" searchWhenChanged="true">
      <label>epoch time</label>
        <eval token="time_pick.earliest">$time$ - 900</eval>
        <eval token="time_pick.latest">$time$ + 900</eval>
          <query>| makeresults
| eval min_time=$time_pick.earliest$, max_time=$time_pick.latest$
| table *</query>
        <option name="count">10</option>
        <option name="drilldown">cell</option>
        <option name="refresh.display">progressbar</option>
          <link target="_blank">/app/search/search?earliest=$time_pick.earliest$&amp;latest=$time_pick.latest$&amp;q=%7C%20makeresults&amp;display.page.search.mode=smart&amp;dispatch.sample_ratio=1&amp;workload_pool=&amp;display.general.type=statistics&amp;display.page.search.tab=statistics</link>

This is an example.
It may be a little different, but the search period is set from the time of the text box.

0 Karma