Forum Discussion
1 minute ago, Stuart Weenig said:You're thinking is good since datapoints can only contain numbers. However, DataSources define how instances are created, including any instance level properties that are created during discovery (and updated through subsequent discoveries).
That DS uses a fairly large, but not overly complicated, script to do discovery. Line 32 is what grabs the list of databases. The loop that starts on line 37 processes each of the results and ends up outputting a single line that defines the instance creation (specifically line 66).
Notice how there is an ilps variable at the end of that line? The script already outputs some instance level properties. You just want to add to that. Line 54 seems to be where each database is looped. Probably within that loop you'd want to add the execution of your query. Then take the result and append it to line 66 like this:
println "${wildvalue}##${instanceName.trim()}/${name}######${ilps}&mycustompropname=${customqueryoutput}"
Where mycustompropname will be the name of the property and the customqueryoutput variable contains the result of your query.
Nice that is cool, thanks for the pointer brain cells are starting to bump together now.