create_rbk
Creates a retroactive blackout or retroactive outage on given targets and updates their availability. Only Enterprise Manager Administrators with OPERATOR privilege on the target can perform this action.
For planned outages, where the administrator forgot to set a blackout, create a retroactive blackout without the -outage option. This increases the target’s availability %. For example, 84% ==> 100%.
For unplanned outages, where Enterprise Manager did not detect the outage, create a retroactive blackout with the -outage option. This decreases the target’s availability %. For example. 100% ==> 84%.
A retroactive blackout or retroactive outage can be created either from the console or using EM CLI. In both cases, it is necessary to enable retroactive blackout first through the user interface (UI). For more information on how to enable retroactive blackout from the UI, see Enterprise Manager Administrator’s Guide.
Format
emcli create_rbk -add_targets="name1:type1;name2:type2;..."... -reason="reason" [-propagate_targets] -schedule= start_time:<yyyy-MM-dd HH:mm:ss>; end_time:<yyyy-MM-dd HH:mm:ss>; [tzregion:<...>;] [-outage] [ ] indicates that the parameter is optional
Options
-
add_targets
Targets to add to the blackout. Each target is specified as target_name:target_type. You can specify this option more than once.
-
reason
Reason for the retro-active blackout. This is used for storing in backup tables.
-
propagate_targets
A blackout for a target of type "host" applies the blackout to all non-agent targets on the host. Regardless of whether this option is specified, a blackout for a target that is a composite or a group applies the blackout to all members of the composite or group.
-
schedule
Schedule for retroactive blackout. The following arguments are mandatory for providing a retroactive blackout schedule:
-
schedule=start_time - The start date/time of the blackout. The format of the value is "yyyy-MM-dd HH:mm:ss". For example: "2013-09-20 12:12:12"
-
schedule=end_time - The end date/time of the blackout. The format of the value is "yyyy-MM-dd HH:mm:ss". For example: "2013-09-20 12:15:00"
-
schedule=tzregion - The timezone region to use. For example: “UTC”. If not provided, tzregion is set to UTC by default.
-
-
outage
Use this option with caution as it will lower the target availability (%). This option should be used only if Enterprise Manager does not detect the outage.
Examples
Example 1
This example creates a retroactive blackout on Oemrep_Database and updates the target's availability record from 2013-09-20 12:12:12 UTC to 2013-09-20 12:15:00 UTC as the blackout. This will result in an increased target availability %.
emcli create_rbk -reason="Testing" -add_targets="Oemrep_Database:oracle_database" -schedule="start_time:2013-09-20 12:12:12;end_time:2013-09-20 12:15:00;tzregion:UTC"
Example 2
This example creates a retroactive blackout for all targets on host example.com and updates their availability records from 2013-09-20 12:12:12 UTC to 2013-09-20 12:15:00 UTC as the blackout. This will result in an increased target availability %.
emcli create_rbk -reason="Testing" -add_targets="example.com:host" -schedule="start_time:2013-09-20 12:12:12;end_time:2013-09-20 12:15:00;tzregion:UTC" -propagate_targets
Example 3
emcli create_rbk -add_targets="adidev.example.com:oracle_database" -reason="Testing" -propagate_targets -schedule="start_time:2017-11-02 9:25:10;end_time:2017-11-02 11:20:24;tzregion:PST" -outage