Configuring Downtime Contacts in Enterprise Manager
Once Always-On Monitoring is synchronized with Enterprise Manager, the monitoring service can send email notifications to the appropriate administrators when the OMS is down via configured downtime contacts. Prior to running Always-On Monitoring for the first time, downtime contacts should be configured in Enterprise Manager. The downtime contacts that Always-On Monitoring sends notification to may be any one of the following forms.
-
Global downtime contact
-
Per-target downtime contact based on target property
-
Per-target downtime contact based on event rules
If email addresses are specified for both Global and Per-target forms, then all email addresses will be used.
Global Downtime Contact
The global downtime contact is a single property set on the Enterprise Manager site. Once set, all target status events and metric alerts across all targets will be sent to the recipients specified in the global downtime contact property.
% emcli set_oms_property -property_name='oracle.sysman.core.events.ems.downtimeContact' -property_value='<email addresses>'
To delete the global downtime contact, run the following command:
emctl delete property -name 'oracle.sysman.core.events.ems.downtimeContact'
Per-Target Downtime Contact from Target Property
The email addresses for these downtime contacts should be specified in the Downtime Contact target property for each target. There are three ways to specify the Downtime Contact target property:
-
For each target, navigate to the Target Properties page, which can be accessed from the target's homepage. From the target menu on the target homepage, select Target Setup and then Properties. The Target Properties page displays.
Click on Edit and specify the email address in the Downtime Contact target property. You can specify multiple email addresses by separating them with commas.
-
Use the EM CLI set_target_property_value verb.
emcli set_target_property_value -property_records="target_name:target_type:property_name:property_value"
Example:
%./emcli set_target_property_value -property_records="myhost:host:Downtime Contact:John.Doe@mycompany.com"
For more information about the set_target_property_value verb, see the Oracle Enterprise Manager Command Line Interface Guide.
-
By leveraging the email recipients in the target down event rules in Enterprise Manager. See the following section for more details.
Per-Target Downtime Contact from Event Rules
Always-On Monitoring may also send email notifications to different users for each target. These contacts are generated in Enterprise Manager based on the event rules for that target. Therefore, as event rules are changed in Enterprise Manager, the contacts must be re-generated and an incremental synchronization performed
By leveraging the event rule setup, the downtime contact will be generated based on the email recipient for the event rule for a Target Availability event type where Down status has been selected.
Note:
Although downtime contacts are generating using only Target Availability event rules, Always-On Monitoring will send notifications for both target availability and metric threshold alerts.
You can review and update the recipients of your target availability (status down) event rules. Doing so allows you to generate a list of downtime contacts using EM CLI or by submitting the downtime contact generation job.
Generating Downtime Contact using EM CLI
From the EM CLI, use the generate_downtime_contact command to produce downtime contacts for a specific target. The command simulates ALL Target Availability rules that would affect that particular target and generates a list of email addresses that includes the output from all rules. The optional -set parameter will cause the contact to be saved so that Always-On Monitoring synchronization can retrieve it later.
% emcli generate_downtime_contact -target_name=<name> -target_type=<type> -set
Generating Downtime Contact Enterprise Manager Job
% emcli create_job -input_file=property_file:<job_prop_file> -name="GenerateDowntimeContacts"
Where the job_prop_file refers to a properties file with the following content:
# job type type=CoreSetDowntimeContacts # description description=You job description # target names, the list of target names variable.target_names=host1,database2 # target types, the list of target types corresponding to the target list above variable.target_types=host,oracle_database # set on all targets, true to update contacts, false to print output but not save variable.set_all_targets=true # frequency to run job, refer to Enterprise Manager documentation for options schedule.frequency=IMMEDIATE
Note:
The process of generating the downtime contacts thru either the EM CLI or the downtime contact generation job, does not immediately make the contacts available to the monitoring service. A separate Always-On Monitoring synchronization must be done each time these contacts are updated. This is done using the emsctl sync command.
Types of Alerts Received by Downtime Contacts
Once configured, Always-On Monitoring will send email notifications for:
-
All target status alerts and metric alerts (critical, warning, and clear).
-
Metric collection errors (both critical and clear).
Target status alerts for aggregate targets, such as groups and clusters, whose status is based on the status of its component members is not supported. Instead, alerts will be sent for the individual members of these aggregate targets..
Note:
Currently, email notification is the only type of notification supported.
The recipients of the email should be email addresses. The recipients are specified using the global property downtimeContact or the per-target Downtime Contact. If both are specified, emails will be sent to all recipients specified.
If the global property downtimeContact is specified, all alerts on all targets will be sent to the recipients specified in the global property downtimeContact. If the per-target property Downtime Contact is specified, all target status and metric alerts for that target will be sent to the recipients specified in that property.
Setting Downtime Contacts for Composite Targets
You can set the Downtime Contacts target property for a composite target so that the target property is propagated to its member targets. You can perform this update using the EMCLI set_target_property_value
verb. See set_target_property_value in the Oracle® Enterprise Manager Command Line Interface for more information about this verb.
Examples
Example 1: The following example sets the AOM Downtime Contact target property for a DB static group.
> ./emcli set_target_property_value -property_records="db_group:composite:Downtime Contact:aom@test.com" -propagate_to_members
Properties updated successfully
Example 2: The following example sets the AOM Downtime Contact target property for a DB system target.
> ./emcli set_target_property_value -property_records="eva4.us.oracle.com_sys:oracle_dbsys:Downtime Contact:aom@test.com" -propagate_to_members
Properties updated successfully