Forum Discussion
Ok, each db has three segments.
You want your discovery output to have one line per instance you want discovered. You need to provide at least two terms for each instance: unique identifier and display name. You can include other terms as well.
Based on your script, it looks like you probably need the dbName and segmentName combined to form the unique identifier for the segment. Ok. Your function should at minimum look like this:
// Function to create instance
def createInstance(name, config) {
println("${name}##${name}")
}
The first time `name` is in your println statement defines the unique id that will match up in the collection script (if BATCHSCRIPT) is used. It’s referred to as the WILDVALUE.
The second time `name` is in your println statement defines the display name of the instance.
You should be checking the Use Wildvalue as Unique Identifier checkbox (it should be the default, the reasons to have it unchecked are few). Having it checked means that you can make the display name anything you want as long as the wildvalue is unique.
If you wanted to add a description or instance level properties (for grouping), your function would look something like this:
// Function to create instance
def createInstance(name, config) {
description = config.something
prop1 = config.something_else
prop2 = config.something_else_entirely
println("${name}##${name}##${description}####prop1name=${prop1value}&prop2name=${prop2value}")
}
I would also recommend making your display name something a little more readable. You don’t even have to have the db name in the display name. You could put the display name in one of the instance level properties and group by that property.
Related Content
- 2 years ago
- 3 days ago
- 2 years ago