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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Break the Build: Inside the KubeDoom Lounge at .conf26

    You step up to the machine. The pixelated corridors of a certain 1993 FPS load in front of you, EMP Pulse ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...