1 of 1 people found this helpful
There are a bunch of different ways of doing this - some are more complex than others, but "slicker"!
As a simple solution, you could do something like the following:
- Create a new config file which expects something like "DB_PLATFORM=Oracle"
- Create a version of this config file for each alternative (i.e. one for Oracle, one for SQL, etc)
- Create a BLPackage for each of these to simply deploy the file to a predefined location (as defined ba the config object)
- Create a compliance job which has the DB as the signature, then as a compliance check, expects to see the config object with the correct value, then auto-remediates with the relevant BLPackage if it's missing.
- Create a new server property - something like DB_PLATFORM
- Write an NSH script which reads the config file and uses it to set the server property (e.g. blcli Server setPropertyValueByName targetServer DB_PLATFORM Oracle)
- Run this as part of a batch job which does a Component Discover, Compiance, NSH Script Job for the target servers.
- NOW you can use that new property to create a Server Smart Group
As I said, there are maybe cooler ways to do this, but this method is simple to implement, simple to troubleshoot, and involves the least scripting.
Hope that helps!
Create component templates that contains a discovery condition that identifies the server types.
Run a discovery job for the templates
Create a server smart group w/ the condition like ‘TEMPLATES*’ = one of the templates
Wot Bill said - it's even easier than what I suggested!
This is awesome! Thanks Bill
FYI the operands are 'assign', 'persist' and 'contains'
no equals so obviously easiest to use contains
I'm finally able to spend some time to implement this, I currently have "Windows Service:SQL Server (MSSQLSERVER)" exists, however the service will have a different name if the SQL instance has been renamed e.g. "Windows Service:SQL Server (INSTANCE1)", "Windows Service:SQL Server (INSTANCE2)" etc..
Can I wildcard the service name? I want to discover servers where , "Windows Service:SQL Server" exists
Instead of "exists" do you have the ability to choose "starts with" (or something similar) instead? And leave off the () part.
You may also want to give the registry keys a try too:
There is one for instance name, but cant recall of top of my head.