Splunk Search

How to run three different searches on click of a submitbutton?

Mubarish
Path Finder

Hi

How to run three different searches on click of a submitbutton? The scenario to choose a particular search will be the radio button selection.

Tags (2)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Here's a fairly crude way to achieve this:

<form>
  <fieldset submitButton="true">
    <input type="radio" token="choice">
      <choice value="| stats count | eval search = &quot;search 1&quot;">Search 1</choice>
      <choice value="| stats count | eval search = &quot;search 2&quot;">Search 2</choice>
      <choice value="| stats count | eval search = &quot;search 3&quot;">Search 3</choice>
    </input>
  </fieldset>
  <row>
    <table>
      <searchString>$choice$</searchString>
    </table>
  </row>
</form>
0 Karma

Mubarish
Path Finder

yes like if a radio button is selected form inputs,search button and panel has to display . on clicking the search button, search corresponds to that radio button has to execute and the result has to display in the table. same senario holds good for other radio button.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Sounds like you actually need three links to different dashboards.

0 Karma

Mubarish
Path Finder

hi martin
on clicking the radio button form inputs has to display, user has to provide the inputs and the search result should be based on the form inputs.
on moving to the next radio button table should become empty (ie) table should not show any previous searches. how can i do this?

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...