
12.6 Creating Rules
Rules may be created using either the Web Console or using the Command Console with XML files. The following sections
demonstrate how to manage threshold rules using both methods.
12.6.1 Web Console
The following example shows creation of a low memory alarm using the Web Console. This rule will raise an alarm on any
node if the amount of free memory becomes less than 20% of the total memory.
In Figure 9.1, from the main page of the web console select the “Threshold Rules” MBean in the “Container Configuration”
section.
The Threshold Rules MBean allows new rules to be created and existing rules to be retrieved for editing or removed. The first
step is to create a new rule called “Low Memory”. Enter “Low Memory” in the text field next to createRule and then click
createRule:
The Rule Configuration MBean is displayed. This MBean allows the new rule to be edited.
In addition to viewing the rule, it can be activated or deactivated, conditions can be added or removed or reset, the evaluation
period for the rule trigger can be altered, and the alarm type and text can be modified.
The rule is currently inactive and cannot be activated until it has alarm text and at least one trigger condition. For a low memory
rule a trigger condition is required that uses heap statistics available from the “System Info” parameter set. The statistics
available are
freeMemory
and
totalMemory
. One option is to configure a simple threshold that compares free memory to a
suitable low water mark representing 20% of the total.
If the intention is to raise an alarm if less than 20% (for example) of free memory is available, a relative threshold could be used
that compares the ration between free memory and total memory. The advantage of the this approach is that it is dynamic – the
rule will not need to be reconfigured if the amount of memory allocated to the Rhino node changes.
Open Cloud Rhino 1.4.3 Administration Manual v1.1 80
Comentários a estes Manuais