Dashboards & Visualizations

Customized Text Selection Dashboard

riqbal47010
Path Finder

I have multi input text selection scenerio. the text input is comma seperated input(thanks to @niketnilay).
1- initially I dont want to load any search query OR text value output OR you can say that once I paste input and click on submit button then search stats.
2- once I put comma seperated input to any box ( URL OR MD5 OR SHA) then the search panal appear and show me the results and other one should disapear. ---------ONE INPUT AT ONE TIME------------------
Further to that each requested value is in different index. e.g. URL in index=proxy , MD5 in index=antivirus and so on.

I have done some work. but both search windows apprear. one window with default time shows all results and other with input also search and shows the results.
below is my updated code.

<form>
  <label>test dashboard_tokens</label>
  <description>Include a multiselect input.</description>
  <!-- Independent search to set the required filter from comma separated value in text box -->
  <!-- For example: www.abc.com,www.xyz.com,www.aaa.com converts to src_ip IN ("www.abc.com","www.xyz.com","www.aaa.com") -->
  <search>
    <query>| makeresults
  | fields - _time
  | eval iocFilter=$ioc1|s$
  | eval md5Filter=$md5|s$
  | eval iocFilter="url IN (\"".replace(iocFilter,",","\",\"")."\")"
  | eval md5Filter="process_md5 IN (\"".replace(md5Filter,",","\",\"")."\")"
      </query>
    <done>
      <set token="tokIOCFilter">$result.iocFilter$</set>
      <set token="tokmd5Filter">$result.md5Filter$</set>
    </done>
  </search>
  <fieldset autoRun="true" submitButton="true">
    <input type="text" token="ioc1" searchWhenChanged="true">
      <label>URL</label>
      <change>
        <condition></condition>
      </change>
    </input>
    <input type="text" token="md5" searchWhenChanged="true">
      <label>md5</label>
    </input>
    <input type="time" token="field1">
      <label></label>
      <default>
        <earliest>-1s@s</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row>
    <panel depends="$ioc1$">
      <title>tokIOCFilter: $tokIOCFilter$</title>
      <event>
        <search>
          <query>index=proxy $tokIOCFilter$</query>
          <earliest>$field1.earliest$</earliest>
          <latest>$field1.latest$</latest>

        </search>
        <option name="refresh.display">progressbar</option>
        <option name="maxLines">5</option>
      </event>
    </panel>
    <panel depends="$md5$">
      <title>tokmd5Filter: $tokmd5Filter$</title>
      <event>
        <search>
          <query> index=edr $tokmd5Filter$ </query>
          <earliest>$field1.earliest$</earliest>
          <latest>$field1.latest$</latest>

        </search>
        <option name="refresh.display">progressbar</option>
      </event>
    </panel>
  </row>
</form>
Tags (1)
0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...