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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...