Oracle SOA Suite 11g Performance Tuning Cookbook
上QQ阅读APP看书,第一时间看更新

Configuring alerts in Hyperic

Monitoring an application provides information on how that application is behaving, and it can be compared to the old data to understand when an application is behaving abnormally, but if all we have is graphical monitoring, we need someone to sit and watch the metrics looking for abnormal behavior. Alerting allows us to have the monitoring framework notify us when a metric breaches some boundary condition, meaning we can receive an e-mail or other notification when something needs looking at, and don't have to sit looking at the metrics.

Getting ready

You will need to install Oracle SOA Suite and the Hyperic HQ server and agents for this recipe. Both Hyperic HQ and Oracle SOA Suite will need to be running. You will also need the login credentials for the Hyperic HQ console. Hyperic will need to be configured with working e-mail settings to be able to send out alert e-mails.

How to do it...

We can set up alerts in Hyperic by following these steps:

  1. Log in to the Hyperic HQ console.
  2. Open the Resources menu, and select Browse.
  3. Select the platform that has the server you want to set an alert on, which should be one of your SOA Suite managed servers.
  4. Navigate to the relevant resource, click on the name of the metric on the graph pane in the center of the screen; this will show the detailed graph:
  5. Click on Define New Alert on the menu at the top-right of the graph.
  6. This will take you to the alert definition window. Enter the details such as the name, priority, and description, and then set the condition that you wish the alert to fire on. Finally, set whether you wish the alert to fire once, or every time the condition is true, or be damped for a time after it fires.
  7. Click on Ok; this will take you to the alert summary screen:
  8. At the bottom of the summary screen is the notifications section. Click on Notify Other Recipients and then Add To List…. This will allow you to enter the e-mail addresses of everyone you wish to be notified when the alert condition is true.

How it works...

Alerts are generated by the server when it receives metrics from agents. It filters the stream of incoming metrics and checks whether any will cause an alert to fire. So, depending upon how frequently agents are gathering metrics and reporting them to the server, it may take a few minutes before an alert is fired. When an alert is triggered, the associated actions are processed, which will normally involve sending e-mails to users or mailing lists, and possibly notifying Hyperic HQ users via their dashboards.

In this recipe, we configured a simple e-mail notification, although it is possible to have more complex actions, especially if you wish to write a custom action plugin. One of the most common actions to perform is to raise an SNMP event to a corporate-level incident management system, which can be accomplished by using the OpenNMS action. Hyperic has a plugin-based architecture, so it is possible to produce almost any other notification methods if you wish.

There's more...

The fact that alerts are generated on the server side means you need to give yourself sufficient time to be able to react to a condition, although it is still necessary to avoid false positives. This means that setting the alert thresholds can be quite a complex task, which may require several iterations to get it correct.

In addition setting alerts on metric conditions, it is also possible to set them up for configuration changes or errors being logged to a log file.

For more information about configuring alerts, see the Hyperic documentation at https://support.hyperic.com/display/DOC/Defining+Alerts.

See also

  • The Installing the Hyperic server, Installing Hyperic agents, and Configuring Hyperic to monitor SOA Suite 11g recipes