Getting Data In

How to extract the first and last start time (as conditional term) and only use them in a search?


Hi Guys,

in my data I have time slots in this format:


for each field. the number of starttimes are 17 (search was run on the data in 17 different times) for the whole data and I only need to use the first and last start times in my search, for example if we assume the whole times like this: 140153402,...., 1402513801, 1403032818

I only need my search to run on the fields which contains the first (140153402) and the last (1403032818) start time and ignore the results regard the start times in between .

How can I add this conditional (?) term to my search?

Thank you so much in advance for your help.

0 Karma

Revered Legend

See this run anywhere example with two data inputs.

  <label>Two input Form</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="sourcetype" searchWhenChanged="true">
      <populatingSearch fieldForLabel="sourcetype" fieldForValue="sourcetype">index=_internal | stats count  by sourcetype</populatingSearch>
    <input type="dropdown" token="source" searchWhenChanged="true">
          <populatingSearch fieldForLabel="source" fieldForValue="source">index=_internal | stats count  by source</populatingSearch>
        <searchString>index=_internal sourcetype=$sourcetype$ source=$source$| timechart count</searchString>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
0 Karma

Revered Legend

What is your current search query?

0 Karma


it's just a normal query e.g showing a table based for two variables. actually I want to use this "start time" as a variable (using an input like drop-down menu) for my dashboard (form) to choose the result based on first or last or both times and ignore the other start times and results related to them, but I have no idea how to do that?

I've used it for normal search like this:

index=remedy 1403032818 OR 140153402 | (rest of the search) ....

but for a form using drop-down menu ...?

0 Karma
Get Updates on the Splunk Community!

Introducing Ingest Actions: Filter, Mask, Route, Repeat

WATCH NOW Ingest Actions (IA) is the best new way to easily filter, mask and route your data in Splunk® ...

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...