Event rule attributes

An event consists of three attributes: an event type, a timestamp, and a list of event-specific arguments that are represented as a list of tag=value pairs. By using text substitution in the form of $tag, you can create an expression to match a specific event instance rather than all events of a specific type.

For example, to receive an email when the system is not online, it is not enough to create an event rule for a sysStateChanged event. Because the sysStateChange event recognizes every state transition, you can be notified whenever the state changes at all, such as from online to paused.

You can add an event args expression to further qualify the event for notification. If you specify an expression, the system substitutes the event arguments into the expression before evaluating it. The system uses the result combined with the event type to determine a match. So, to send an email message when the system is no longer online, you would use the expression: $previousState == online && $currentState!=online. The system gets the value of previousState and currentState from the actual argument values of a sysStateChanged event.

You can specify an event by using equality expressions, wildcard expressions, compound AND expressions, or OR expressions. The following table describes these expressions.
Table 1. Event argument expression syntax
Expression Syntax Example
EqualityExpr <string> == <string>

<string> != <string>

‘$hwType == spu’

‘$hwType != spu’

WildcardExpr <string> ~ <string>

<string> !~ <string>

'$errString ~ *spu*'

'$errString !~ *ascq*'

AndExpr EqualityExpr ‘&&’ EqualityExpr '$previousState == online && $currentState != online’
OrExpr EqualityExpr ‘||’ EqualityExpr '$threshold == 80 || $threshold == 85’