Dashboards & Visualizations

Autosuggest

TylerJVitale
Explorer

I'm creating a dashboard with text inputs. Is there a way to get Splunk to have a dropdown with autosuggestions when the user types in the text box, similar to how it works in the Search and Reporting app?

Tags (1)
0 Karma
1 Solution

renjith_nair
Legend

@TylerJVitale,

You could use Multiselect input for that where you could load all your possible dataset and when user start typing, the results are popped up. In text box, there are no ways to pre-populate except the default data.

---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

0 Karma

renjith_nair
Legend

@TylerJVitale,

You could use Multiselect input for that where you could load all your possible dataset and when user start typing, the results are popped up. In text box, there are no ways to pre-populate except the default data.

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

TylerJVitale
Explorer

That seems like it would work. How would I set it up so I could load the dataset i.e. in the input settings what would I have to select/adjust?

0 Karma

renjith_nair
Legend

Please see a sample dashboard which could be run anywhere

<form>
  <label>Tyler J Vitale</label>
  <fieldset submitButton="false">
    <input type="multiselect" token="sourcetype" searchWhenChanged="true">
      <label>Sourcetype</label>
      <valuePrefix>sourcetype="</valuePrefix>
      <valueSuffix>"</valueSuffix>
      <delimiter> OR </delimiter>
      <fieldForLabel>sourcetype</fieldForLabel>
      <fieldForValue>sourcetype</fieldForValue>
      <search>
        <query>index=_*|stats count by sourcetype</query>
        <earliest>-15m</earliest>
        <latest>now</latest>
      </search>
      <prefix>(</prefix>
      <suffix>)</suffix>
    </input>
  </fieldset>
  <row>
    <panel>
      <chart>
        <search>
          <query>index=_* $sourcetype$ |timechart count by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.chart">line</option>
        <option name="charting.chart.nullValueMode">zero</option>
        <option name="charting.drilldown">none</option>
        <option name="charting.layout.splitSeries">0</option>
      </chart>
    </panel>
  </row>
</form>
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

TylerJVitale
Explorer

The dashboard keeps freezing every time I try to implement this

0 Karma

renjith_nair
Legend

Its quite strange, because we are selecting only last 15 mins data. This is a smoothly running dashboard on my mobile device. You need to select a sourcetype in the multiselect to run the dashboard. What about other searches in your environment?

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

TylerJVitale
Explorer

Other searches in my environment run fine. I think it freezes because there are millions of servers in the database and splunk has difficulty processing all of them into one multiselect input

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!

Casting Call: Compete in Cyber Games

Lights, Camera, SecOps: Apply to Compete in Cyber Games     Think you have what it takes to beat the clock? ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

How Edge Processor's Durable Queue Works

Edge Processor sits in one of the most consequential places in any Splunk pipeline: between your data sources ...