Oracle® Enterprise Manager Ops Center

Create a Custom Alert

12c Release 3 (12.3.1.0.0)

E63195-01

December, 2015

This guide provides an end-to-end example for how to use Oracle Enterprise Manager Ops Center.

Introduction

Procedures for changing the conditions that trigger alerts in Oracle Enterprise Manager Ops Center.

provides default monitoring policies for each type of asset. These policies contain one or more rules for generating alerts. The document Tune a Monitoring Rule and Policy explains how to adjust an existing alert by disabling, editing, and adding rules. This example shows how to create a new alert for a specific purpose by creating the expression rule and its monitoring policy. Create an alert when editing the system-defined rules and policies is not sufficient.

A custom alert requires:

- At least one user-defined rule

- A monitoring policy to hold the new rule and any additional rules

This example shows you how to create a new rule and add it to a copy of the OC - Operating System monitoring policy to create a new policy called Critical Operating Systems. The new policy contains an expression rule. The new policy is assigned to a group containing one target.

About Rules

Describes ways to adjust the rules that control alerts in Oracle Enterprise Manager Ops Center.

Rules consist of the following components:

- Threshold: Sets an upper or lower limit for the rule. You can set Info, Warning, and Critical thresholds. If this is the only change, use the procedures in Tune a Monitoring Rule and Policy.

- Boolean Control: Sets a logical operator of true or false for the rule. If this is the only change, use the procedures in Tune a Monitoring Rule and Policy.

- Enumerated Control: A series of values that is a subset of specific values among the possible values of the monitored attribute. An alert occurs when the attribute's value matches one of the specific values. If this is the only change, use the procedures in Tune a Monitoring Rule and Policy.

- Expression: Defines the variables, literals, and operators for an attribute. An expression is an instruction to execute an operation that returns a value. If you need to monitor an asset's attribute that is not included in the existing rules, use the procedures in this document to create a new expression rule and include it in a monitoring policy.

To create an expression monitoring rule, use Enterprise Manager Ops Center's query language to write a logical expression that defines the alerting condition for one or more resource attributes. The logical expression includes attribute names, operators, and literal values. You can use a dotted notation to reference attribute subfields.

About Policies

Describes methods for adjusting alerts in Oracle Enterprise Manager Ops Center.

You can view and edit the rules for a specific asset or policy:

- Asset View: Rules for a specific asset are located in the asset's Monitoring tab. Select the asset in the Asset section of the Navigation pane, then click the Monitoring tab in the center pane. Editing a rule from the Asset view creates a new policy for that asset.

- Policy View: Rules for a specific policy are located in Monitoring Policies in Plan Management. Expand Plan Management in the Navigation pane, scroll to the Operational Plans section and click Monitoring Policies. Editing a rule from the Policy view changes the policy and all assets associated with the policy use the revised monitoring policy.

The preferred and recommended method is to select a policy from the Policy View so that consistency among all assets of that type is maintained. However, to develop and test a new alert, create the policy from the Asset View to test on a single asset until you are ready to change the policy for all assets.

Also, while developing the alert and applying it to an individual asset, create a group with the asset as its only member and then apply the policy to the group. When you are ready to apply the policy to all assets in a group, you can add the new alert to the that group's policy.

What You Will Need

Lists requirements for changing a rule.

You need the following to tune monitoring:

- The asset of the specific type. This example uses the Operating Systems type.

- The Profile/Plan Admin role to modify monitoring policies.

- The Fault Admin role to apply a monitoring policy to an asset.

- The Asset Admin role to apply the monitoring policy to a group of assets.

Creating a Custom Alert

Lists the steps for creating a new alert in Oracle Enterprise Manager Ops Center.

To create an alert, you create at least one monitoring rule and you create the policy that applies the new rule. This example describes how to do the following:

- Design the Custom Alert

- Create a New Policy

- Add a New Expression Rule

- Associate a Group of Assets With the Policy

Design the Custom Alert

Lists the inputs for a custom alert and the general procedure for creating the alert in Oracle Enterprise Manager Ops Center.

When you add or edit a rule, Ops Center prompts for the following information:

- A name and description for the rule

- The asset type, its attributes to be monitored, and the limits or values for each attribute. This is the query expression.

- Frequency of monitoring

- Amount of time that can elapse before the alert is generated

- Severity level

The query expression in the rule defines an object that checks whether an asset attribute verifies a given condition. The query language is modeled on the WHERE clause of SQL SELECT statements. The following procedure creates the query expression component of the rule:

1. Identify the Asset Type and the Attribute To Be Monitored

2. Review Examples of Expression Rules

3. Construct the Query

Identify the Asset Type and the Attribute To Be Monitored

Procedure to locate valid asset attributes in Oracle Enterprise Manager Ops Center.

The Java documentation contains a list of the valid attributes that you can use in monitoring rules. The Java documentation is in the Software Development Kit package SUNWxvmoc-sdk.pkg in the Enterprise Manager Ops Center installation bundle.

1. In the Enterprise Controller's system, navigate to the following directory:

- Linux OS: installation directory/xvmoc_full_bundle/Linux_i686/Product/components/packages/

- Oracle Solaris OS for SPARC: installation directory/xvmoc_full_bundle/SunOS_sparc/Product/components/packages/

- Oracle Solaris OS for x86: installation directory/xvmoc_full_bundle/SunOS_i386/Product/components/packages/

2. Unpack the Software Development Kit package SUNWxvmoc-sdk.pkg. You can do this on the Enterprise Controller or on any other system.

# pkgadd -d SUNWxvmoc-sdk.pkg

This package installs the Javadocs in the /opt/sun/xvm/sdk/xvm_oc/doc/javadoc/ directory.

3. Open the Javadoc index file:

file:///<hostname>/xvm_oc/doc/javadoc/index.html

4. Locate the attributes for the asset type. In this example of a query expression for an operating system, the following figure shows the OperatingSystem asset type, its FileSystemUsage attribute, and the parameters for the attribute: name, type, totalSpace, freeSpace, usedSpace, freeSpacePercentage, and usedSpacePercentage.

We can create a rule for the asset's filesystem that set thresholds for one or more of these parameters.

Review Examples of Expression Rules

Provides a pointer to examples of expression rules in Oracle Enterprise Manager Ops Center.

See Expression Query Language in the Oracle Enterprise Manager Ops Center Configuration Reference for details about monitoring attributes, classes, lexical elements, grammar, and semantics.

Construct the Query

Gives an example of a expression rule.

Following the examples and using the parameters for the FileSystem attribute, we can construct an expression rule that raises an alert when the root disk is above 80% and the CPU usage is above 10%.

FileSystemUsages.name="/".usedSpacePercentage >= 80) AND (CpuUsage.usagePercentage >=10

Create a New Policy

Procedure for creating a policy in Oracle Enterprise Manager Ops Center.

Enterprise Manager Ops Center has a default set of monitoring policies, which use the naming convention of starting with the characters OC. You can create a policy for the new query rule by renaming a copied policy to create an editable version or by creating a new policy. This example creates a policy for critical operating systems by using the Copy Policy action.

1. Expand Plan Management in the Navigation pane, scroll down to Operational Plans, then click Monitoring Policies.

2. Right-click and click Copy Policy or click Copy Policy in the Actions pane.

3. Edit the policy name and description for the new policy, then click Next. In this example, the new policy is named Critical Operating Systems.

4. Click Finish to create the policy.

When the job is completed, the new policy is added to list in the Navigation pane.

Click the policy to display details in the center pane. You can now change the new policy by adding the new expression rule, as described in Add a New Expression Rule.

Add a New Expression Rule

Procedure for adding or changing a rule in a policy.

The asset type is based on the policy. This example is based on an operating system policy and will raise an alert when the root disk is above 80% and the CPU usage is above 10%. The expression for this example is: FileSystemUsages.name="/".usedSpacePercentage >= 80) AND (CpuUsage.usagePercentage >= 10.

1. To view the copied policy, expand Plan Management in the Navigation pane, scroll down to Operational Plans, then click Monitoring Policies.

2. Select the new Critical Operating Systems policy.

3. Click the Add icon in the center pane.

4. In the Rule Type menu, select Expression.

5. Accept the default Asset Type, Operating System.

6. Enter a monitoring rule name and description, for example, its purpose.

7. Accept the default type of monitoring, Monitor for alert limits continuously.

8. Define the amount of time that can elapse before an alert is generated. In this example, the delay is two minutes.

9. Click the Severity drop-down list and select the Warning level.

10. Enter the expression that you created. For this example, enter the following:

FileSystemUsages.name="/".usedSpacePercentage >= 80) AND (CpuUsage.usagePercentage >=10

11. Use the Immediate Action field to describe what action to take when the alert creates this incident.

12. Click Apply.

The new rule is now part of the policy. An alert will generate when the root disk is above 80% and the CPU usage is above 10.

Associate a Group of Assets With the Policy

Procedure for creating a group and adding a policy for the group.

The software assigns a default monitoring policy when an asset is discovered. To use the new monitoring policy instead, create a group for the asset and then associate the group with the new policy.

With this example, you have created a monitoring policy called Critical Operating Systems. Now create an asset group and assign the monitoring policy to the group.

1. Click Assets in the Navigation pane.

2. Click Create Group.

3. Enter a name and description for the group.

4. Accept the default a Top Level location.

5. In Advanced Options, select Configure Group Rules. This action enables the Preview Group Before Creation option, which is selected by default.

Click Next.

6. To configure the group, accept the default of All to indicate assets must match all rules to be eligible for membership in the group. In this case, there is one rule.

7. In the Asset Type field, click the drop-down list and select Operating System.

8. In the Preview step, all the operating systems are listed. These assets will be monitored according to the new alert.

9. Review the summary of the new group. Click Finish to create the group.

10. When the job finishes, expand Assets and select the All User Defined Groups filter from the menu.

11. Select the new group. The Summary page and Membership Graph are displayed in the center pane.

12. Click Apply a Monitoring Profile in the Actions pane.

13. In the Policy field, select the new policy from the drop-down menu.

14. Click Apply. When the job is complete, all assets in the new group are monitored with the new policy.

Test the Query

Describes how to verify a new query.

The product software cannot test the validity of the new rule. In some, but not all cases, the word No appears in the Enabled column for a new but invalid rule.

Use the Analytics feature to see how the operating system is performing. Tune the rule to ensure the alert is raised under the appropriate conditions. For example, a CPU usage of 10% might be too generous for your site.

What's Next?

When you are satisfied that the new rule is raising alerts under the conditions you want, add other operating systems to the group.

Related Articles and Resources

See the following for more information:

- Set Up Monitoring Rules and Policies in Oracle Enterprise Manager Configuration Reference for information about managing and monitoring hardware assets.

- Tune a Monitoring Rule and Policy

- Operating Systems Management in Oracle Enterprise Manager Operations Reference for information about monitoring operating systems.

- Expression Query Language in Oracle Enterprise Manager Configuration Reference for details on monitoring attributes, classes, lexical elements, grammar, and semantics.

For end-to-end examples, see the workflows and how to documentation in the library. For deployment tasks, go to http://docs.oracle.com/cd/E59957_01/nav/deploy.htm and for operate tasks go to http://docs.oracle.com/cd/E59957_01/nav/operate.htm.

Oracle® Enterprise Manager Ops Center Create a Custom Alert, 12c Release 3 (12.3.1.0.0)

E63195-01

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.

Oracle Legal Notices

Copyright Notice

Copyright © 1994-2017, Oracle and/or its affiliates. All rights reserved.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

Hazardous Applications Notice

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

Third-Party Content, Products, and Services Disclaimer

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.

Pre-General Availability Draft Documentation Notice

If this document is in public or private pre-General Availability status:

This documentation is in pre-General Availability status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.

Private Pre-General Availability Draft Documentation Notice

If this document is in private pre-General Availability status:

The information contained in this document is for informational sharing purposes only and should be considered in your capacity as a customer advisory board member or pursuant to your pre-General Availability trial agreement only. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in this document remains at the sole discretion of Oracle.

This document in any form, software or printed matter, contains proprietary information that is the exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms and conditions of your Oracle Master Agreement, Oracle License and Services Agreement, Oracle PartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which has been executed by you and Oracle and with which you agree to comply. This document and information contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle without prior written consent of Oracle. This document is not part of your license agreement nor can it be incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.