The following example shows how to create and use a simple static
selector:
- Create a server resource named Mercury and associate it with an
agent.
- Create a selector named Mercury. Set it to select a Standard Property,
property=BF_NAME, Operator=EQ (Equal), Value=Mercury, and Required.
- Create a project named Lincoln. Assign the Mercury selector to
it.
When you run the Lincoln project, the system selects the server
resource named Mercury. If that server resource is not available,
the project fails.
The following example shows how to set up dynamic server selection
in a set of servers:
- Create a collector named RAMSIZE. Set it to collect the Built-in
property MEM_TOTAL.
- Create server resources to associate with hosts. Set each one
to use collector RAMSIZE.
- Mercury, a host with 512 MB RAM
- Mars, a host with 1 GB RAM
- Jupiter, a host with 3 GB RAM
- Create a selector named BigRam. Set it to select a Standard Property,
property=MEM_TOTAL, Operator=GE (Greater than or Equal), Value=2048,
and Required. MEM_TOTAL is expressed in MB. This selector selects
only hosts that have 2 GB of RAM or more.
- Create a selector named SmallRam. Set it to select a Standard
Property, property=MEM_TOTAL, Operator=GE (Greater than or Equal),
and Value=256. This selector selects only hosts that have 256 MB
of RAM or more.
- Create two projects:
- HighMaint: set this project to use selector BigRam.
- LowMaint: set this project to use selector SmallRam.
When you run HighMaint, the system chooses the server Jupiter,
because it is the only one that meets the selector requirement of
having at least 2 GB of RAM.
When you run LowMaint, the system chooses any of the three server
resources that is available.
If you later add a server resource named Neptune for a host that
has 2 GB RAM, then the next time project HighMaint runs, one of either
Neptune or Jupiter is selected for the project. If Jupiter is down
for some reason, then Neptune is selected. It is the only one left
that fits the selector.