
Working with vFoglight Rules and Registry 313
Working with Rules
You click the Validate Scope button ( ) to ensure that the topology type is valid and
that you used the correct syntax in the Rule Scope box. The rule scope is successfully
validated, so you click Next to navigate to the Condition, Alarms & Actions tab.
Specifying conditions
After scoping the rule to EJB_Instance1 in MyApplication, you specify the
conditions for the rule on the Condition, Alarms & Actions tab.
To start the process of setting the condition for the Fatal severity level, you click the
header for this level on the Condition, Alarms & Actions tab.
You had previously created a derived metric called
transactionRollbackRate: you
derived this metric from the raw metric
transactionsRolledBackTotalCount so
that it returns a rate (the total number of transactions that are rolled back per minute).
On the Condition sub-tab for the Fatal level, you click the Condition Editor button
( ) to launch the Condition Editor. You switch to the Metric/Property tab, select
transactionRollbackRate from the Choose Metric Value list, and click Select to insert
it into the Condition box. You then type
>10 in this box after the metric name.
When you finish editing the information in the Condition box, the condition is specified
as follows:
#transactionRollbackRate#>10
You repeat this process for the Critical and Warning levels, specifying the conditions for
these levels as
#transactionRollbackRate#>8 and
#transactionRollbackRate#>6, respectively.
You click Finish when you have specified the conditions for all three severity levels.
You review the settings for the rule on the Rule Added area and then click the Go to
Rule List button. The new rule is listed on the Manage Rules dashboard.
Example: Creating a Simple Rule
A simple rule is scoped to the topology type JVM and has the condition
#threads_started#>10. This means that the rule will enter the Fire state when any
instance of the
JVM topology type returns a started-threads count greater than 10.
The rule includes an expression called
ThreadsNum. The value of this expression is the
metric
#threads_started#, the same metric that is used in the rule’s condition. In
turn, this expression is referenced in a message called
ProblemSynopsis whose value
is
Threads started count is too high: @ThreadsNum.
Comentarios a estos manuales