Dec 23, 2017

Mange Black-outs using Oracle Enterprise Manager (OEM) cloud control 13c EMCLI

Blackouts allow you to collect accurate monitoring data. For example, you can stop data collections during periods where a managed target is undergoing routine maintenance, such as a database backup or hardware upgrade. If you continue monitoring during these periods, the collected data will show trends and other monitoring information that are not the result of normal day-to-day operations. To get a more accurate, long-term picture of a target's performance, you can use blackouts to exclude these special-case situations from data analysis.

Here I will show you how to use EMCLI commands to manage blackout:
a) Create a Black-out
b) List blackouts
c) Stop Blackout:
d) Delete a blackout
e) Get blackot reasons

Enterprise Manager administrators who have at least Blackout Target privileges on all Selected Targets in a blackout will be able to create, edit, stop, or delete the blackout.

a) Create a Black-out:

./emcli create_blackout -name="CPU Patch 12062017" -reason="to be done" -add_targets="omstst:oracle_database" -schedule="duration::10"

$ ./emcli create_blackout -name="CPU Patch 12062017" -reason="to be done" -add_targets="omstst:oracle_database" -schedule="duration::10"

Error: Only Super Administrators are allowed to add a new reason (the get_blackout_reasons command will list the reasons you can use)
bin]$

Fix: Connect to SYSMAN user or user with super admin privilege and then try.

Think: How fast could you blackout entire environment for maintenance window with this scripted.

b) List blackouts:

$./emcli get_blackout_targets -name=Blackout_Name
e.g.,

$ ./emcli get_blackout_targets -name="CPU Patch 12062017"
Target Name       Target Type      Status       Status ID
testbox_testbox1  oracle_database  In Blackout  1
bin]$

c) Stop Blackout:

Simply state the name of the blackout and the agent will issue a stop to the OMS

./emcli stop_blackout -name="Linux Patch 12062017"

Think, How quickly could you end a blackout of environment post maintenance?

Note:  Get pre-defined blackout reasons. i.e., What Oracle make default for you.

./emcli get_blackout_reasons

d) Delete a blackout:

Syntax: ./emcli delete_blackout -name="blackout_name"

e.g.,
$./emcli delete_blackout -name="Linux Patch 12062017"


e) Get blackot reasons. What Oracle make default for you.

./emcli get_blackout_reasons

e.g.,

 bin]$ ./emcli get_blackout_reasons
AS: Application Server Bounce
AS: Application Server Configuration Change
AS: Application Server Emergency
AS: Application Server Patch/Maintenance
AS: Application Server Upgrade
Apps: Application Configuration Change
Apps: Application Decommissioning
Apps: Application Emergency
Apps: Application Password Change
Apps: Application Patch/Maintenance
Apps: Application Standardization
Apps: Application Upgrade
Apps: New Application Monitoring
DB: Associated Exadata Express Service Decommissioning
DB: Database Cold Backup
DB: Database Configuration Change
DB: Database Decommissioning
DB: Database Emergency
DB: Database Password Change
DB: Database Patch/Maintenance
DB: Database Refresh
DB: Database Upgrade
DB: Disaster Recovery Node
DB: New Database Monitoring
Enterprise Manager: Agent Configuration Change
Enterprise Manager: Agent Emergency
Enterprise Manager: Agent Patch/Maintenance
Enterprise Manager: Agent Upgrade
Enterprise Manager: OMS Server Configuration Change
Enterprise Manager: OMS Server Emergency
Enterprise Manager: OMS Server Maintenance
Enterprise Manager: OMS Server Patch/Maintenance
Enterprise Manager: OMS Server Upgrade
Enterprise Manager: Plug-in Upgrade
Hardware Configuration Change
Hardware Emergency
Hardware Failure
Hardware Patch/Maintenance
Hardware Upgrade
Network Configuration Change
Network Emergency
Network Hardware Failure
Network Outage
Network Patch/Maintenance
Network Upgrade
OS Configuration Change
OS Emergency
OS Password Change
OS Patch/Maintenance
OS Upgrade
Other: Customer Request
SLB: Load Balancer Configuration Change
SLB: Load Balancer Emergency
SLB: Load Balancer Patch/Maintenance
SLB: Load Balancer Upgrade
Security Patch
Server Bounce
Server Decommissioning
Server Physical Move
Storage Filer Upgrade
Testing

$

Note: 
You can use any of them as a blackout reason. Use -reason and put any reason.

1 comment:

Translate >>