Create Blackout for Multiple Targets on EM13c

The notifications emails of a “planned” downtime is one of the annoying things of monitoring systems. You forget creating blackout and you start a maintenance work, and you get lots of notifications mails. Most of the time, the target which goes down, also affect other targets so it will multiple the number of unwanted notifications mails. Good thing is, it’s very easy to create blackouts on EM13c. We can do it through web console, emctl or emcli tools. A one-liner is enough for it:

The above code will create a blackout for the all targets on the server. We can achieve the same thing by EMCLI:

If we use emcli, we have more options such as creating repeating blackouts, entering a reason for blackout, enabling blackout for a group of targets (which resides on different hosts).

What if we need to create blackout for multiple targets. As I mentioned, EMCLI can be used to create blackout for groups. We can create groups on EM13c, and instead of passing names of all targets in a group, we can give the group name:

The script accepts two parameters. First parameter is the path of the file containing the targets, the second parameter is the name of the blackout. The targets file should be something like this:

After you create a blackout, you can stop (and delete) the blackout by running it again, but this time you need to enter “stop” as the file name:

If you have any questions about the script, please do not hesitate to ask. By the way I’m aware that the script has lack of error handling, can be written more efficent but I’m not trying to provide a script library to you

I’m sharing a simple version so you can write your own (and better) script.

Please share

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.


  1. Hello ,

    Its really and very good article and useful too. I wanted to know about the Load balancing options for OEM 13c, please share if you have something on this.


  2. kevin s

    Do you know of a way to schedule a recurring blackout for a day of the month? For instance, our server patching schedule occurs on the 2nd Saturday every month for Dev servers and on the 3rd Saturday for production servers. I haven’t been able to find a way to create a schedule like that in OEM. We are currently on v 13.2.


  3. Ed

    Love your logo.
    BTW, here’s a question that I’ve been trying to find answer for and can’t find one but maybe it is something that you’ve come across with before.
    To prepare for removing a database target, we want shutdown the db for a few weeks first before we then delete the target. In this case, we plan to create a blackout with an end time of indefinite. Can we delete the target before ending the Blackout or do we have to end the Blackout and then delete the target? I don’t see an option to do a delete Blackout 🙁

    • Gokhan Atil

      Hi Ed,

      As I know you can delete a target before ending the blackout but I didn’t do it for years (and unfortunately I do not have a testing environment so I can’t test)… Anyway, if it gives an error, you can just stop and delete the blackout before deleting the target (emcli verbs: stop_blackout, delete_blackout, delete_target)

Leave Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.