Dashboards & Visualizations

Dropdown menu with sourcetypes

cafissimo
Communicator

Hello, I would like to populate a dropdown in a form with all sourcetypes I have indexed. I remember something like "| metadata = sourcetype", but I am not sure. Any help would be appreciated. Thanks in advance

Tags (1)
0 Karma
1 Solution

ziegfried
Influencer

The search you're looking for is:

| metadata type=sourcetypes

And to get a dropdown, you can use a SearchSelectLister:

<module name="SearchSelectLister">
  <param name="settingToCreate">sourcetype</param>
  <param name="search">| metadata type=sourcetypes</param>
  <param name="label">sourcetype</param>
  <param name="searchWhenChanged">True</param>
  <param name="searchFieldsToDisplay">
    <list>
      <param name="label">sourcetype</param>
      <param name="value">sourcetype</param>
    </list>
  </param>
  ....

View solution in original post

ziegfried
Influencer

The search you're looking for is:

| metadata type=sourcetypes

And to get a dropdown, you can use a SearchSelectLister:

<module name="SearchSelectLister">
  <param name="settingToCreate">sourcetype</param>
  <param name="search">| metadata type=sourcetypes</param>
  <param name="label">sourcetype</param>
  <param name="searchWhenChanged">True</param>
  <param name="searchFieldsToDisplay">
    <list>
      <param name="label">sourcetype</param>
      <param name="value">sourcetype</param>
    </list>
  </param>
  ....
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...