Exclude Targets or Target Types During a Blackout
When creating a blackout on composite target, all members of the composite target, by default, are part of the blackout. You can exclude large numbers of targets or target types from the blackout by using the EMCLI create_blackout
command to create your blackout.
Under certain circumstances, when blacking out composite targets such as WebLogic domain or eBusiness, where the target type contains associations with its constituent components, such as the database, you may want to exclude specific components from the blackout. This means when the WebLogic domain is blacked out, then the database is included as an indirect member of the blackout. While you can manually exclude indirect members using the UI, this can be impractical for large scale environments. Using EMCLI lets you easily exclude indirect members of composite targets using a command line tool.
For example, if a Weblogic system is blacked out, the associated database is included in the blackout. If that database is used by another system as well, then the implication is that there is a state change in the other system using the database. In this situation, you would want to exclude this database from the blackout.
Using the EMCLI create_blackout
command, you can exclude composite target components by using the following verb options:
- exclude_targets: A list of member targets of the direct blackout members can be specified. These indirect members of the blackout and their members will not be part of the blackout. For example, specifying a database system target will exclude that target and the corresponding database instance from the blackout if it would otherwise be an indirect member of the blackout.
- exclude_types: A list of target types can be specified. Indirect members of that type and their members will not be part of the blackout. For example, specifying
oracle_dbsys
will exclude database systems and their members which would be otherwise indirect members of the blackout.exclude_targets
andexclude_types
can be used in combination.
Example 1: The following example creates a blackout on a WebLogic domain, but excludes the database system and its member targets.
emcli create_blackout
-name="wlblkout"
-add_targets="Weblogic_domain:weblogic_domain"
-exclude_types="oracle_dbsys"
-schedule="duration::30"
-reason="good reason1"
Example 2: The following example creates a blackout on a group which contains hundreds of WebLogic domains. The blackout excludes database systems and its member targets (e.g. Oracle home, Listener, Database instance).
emcli create_blackout
-name=Group_Blackout
-add_targets="Weblogic_Domain_Group:group"
-exclude_types=oracle_dbsys
-schedule="duration:1:30"
-reason="WebLogic Domain Maintenance"
For more information about the EMCLI or the create_blackout
verb, see create_blackout in Oracle® Enterprise Manager Command Line Interface.