Product SiteDocumentation Site

8.5. Operation Expressions

An op_expression is a rule condition based on an action of some resource agent. This rule is only valid within an op_defaults context.

Table 8.8. Attributes of an op_expression Element

FieldDescription
id
A unique name for the expression (required)
name
The action name to match against. This can be any action supported by the resource agent; common values include monitor, start, and stop (required).
interval
The interval of the action to match against. If not given, only the name attribute will be used to match.

8.5.1. Example Operation-Based Expressions

A small sample of how operation-based expressions can be used:

Example 8.10. True for all monitor actions

<rule id="rule1" score="INFINITY">
    <op_expression id="rule_expr1" name="monitor"/>
</rule>

Example 8.11. True for all monitor actions with a 10 second interval

<rule id="rule2" score="INFINITY">
    <op_expression id="rule_expr2" name="monitor" interval="10s"/>
</rule>