I currently have an Import source which has the following results:
Now, I want to combine this with data from another source which basically looks like this:
id | software_name | software_version |
---|---|---|
7 | MySQL | Server1 |
32 | MSSQL | Server1 |
How could I use this data so that it becomes something like this:
Code
- object Host "Server1" {
- import "generic-host"
- import "dbserver"
- display_name = "Server1"
- address = "10.0.0.20"
- vars.dbserver = [ "MySql", "MSSQL" ]
- vars.os_family = "windows"
- }
- /** Service Set 'MySQL' **/
- apply Service "MySQL Health" {
- import "generic-service"
- check_command = "mysql_health"
- assign where "MySQL" in host.vars.dbserver
- import DirectorOverrideTemplate
- }
If that is not possible, I would like to know how to assign Service Sets to Hosts based on import source data.