Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to dynamically populate the Extension Configuration choices presented to the user?


So I am writing a Python extension using the Extension 2.0 framework that will query our SolarWinds Orion API to get metrics to then push into Dynatrace and I'm thinking there has to be a better way to populate the metric selection rather than manually putting all the possible metrics to be selected in the extension.yaml file feature sets ahead of time. 

The SolarWinds API has the ability to return a list of available metrics for each entity type, so, ideally, I'd like the user to be able to select the type of entity they want to query metrics about (Host, Interface, Volume, etc...) and then a function in my Python extension would call out to the endpoint provided in the previous configuration screen to get a list of metrics about that entity that the user could then select from (I could even programatically organize those metrics into groups and subgroups based on data I can query from SolarWinds).  Once all the desired metrics are selected for that entity type, they could then submit and that is the group of metrics this instance of the extension would collect.


If there isn't a way to do this, then I'm gonna have to manually setup all of the possible metrics for each entity type ahead of time?  There's soooo many...  There has to be a better way, right?  What am I missing?


Dynatrace Guru
Dynatrace Guru

You cannot dynamically populate it. What we do sometimes is to grab the list of metrics from an API endpoint and then write a script to convert that response to either the extension.yaml or the activationschema.json, either way it becomes static once generated.


Man, that's a bummer.  So anytime we want to add more metrics for the extension to be capable of creating, we'll have to update the entire extension package and upload it as a new version.  It'd be really nice if it was more dynamic.  Anyways, thanks!

Featured Posts