All Apps and Add-ons

Splunk addon builder - How to create an input that shows list of indexes?

ramesh_babu71
Path Finder

Hello,

I have a requirement in new app being build using add-on builder create a input parameter called choose index. This parameter should show the list of avalable indexes from which an user selects one index.

I don't see this option in Splunk Add-on builder helper functions. However, Splunk doc does show such option in a picture just above the section called Pass values from data input parameters
https://docs.splunk.com/Documentation/AddonBuilder/2.2.0/UserGuide/ConfigureDataCollectionAdvanced

Another pic from an add-on which have this feature
alt text

Can anyone help me on this please?

0 Karma

smitra_splunk
Splunk Employee
Splunk Employee

@ramesh_babu71
I think this might help you. Use a query to populate in the dropdown, like given in the answers in the link below.
https://answers.splunk.com/answers/39370/is-it-possibl-to-get-a-list-of-available-indices.html

0 Karma

chli_splunk
Splunk Employee
Splunk Employee

Sorry AoB havent supported this feature yet. Currently you have to hardcode values for a dropdown component in UI, rather than getting indexers during run-time by some Python codes.

0 Karma

ramesh_babu71
Path Finder

Thanks for the update chli_splunk.

I do see that the option of drop down list of index is not available for the section Alert Actions. But it is there in Data Collection of AoB

Hard-coding index values doesn't serve the purpose as client will add/remove indexes in future. Meanwhile I added a new global text field called Index. Client is okay with this approach.

Regards,
Ramesh Babu

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk Cloud Platform 9.1.2308?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2308! Analysts can ...

Index This | Why do they call it hyper text?

November 2023 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

State of Splunk Careers 2023: Career Resilience and the Continued Value of Splunk

For the past three years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...