The event definition files use regular expression rules to determine
whether there is a match between a given expression and the console output.
Regular expressions are described in the
grep(1)*
and
?.
The following special characters may be helpful when making changes to event definitions:
^ (circumflex)
When used as the first character of an expression, it anchors an expression
to the beginning of a line.
For example,
^Unable to obtain requested
swap space
indicates that the expression must be at the beginning
of a line.
$ (dollar sign)
At the end of a pattern, it causes that pattern to match only if the
last matched character is the last character (not including the newline character)
on a line.
For example,
Unable to obtain requested swap space$
indicates that the phrase must be at the end of a line.
^$ (circumflex and dollar sign)
The construction
^pattern$
restricts the pattern to matching only an entire line.
For example, the regular
expression
^abcd$
matches lines containing the string
abcd, where
a
is the first character on the line
and
d
the last.
. (period)
When used outside a bracket expression, matches any single character.
+ (plus sign)
Matches one or more occurrences of a character.
For example,
hel+o matches
"hello" and "hellllo".
.+ ( period and plus sign)
Match any and all characters.
It is similar to
glob
symbol
*.
For example,
NFS3 server .+ not responding
will produce a match with any characters substituted for
.+
provided that they are preceded by "NFS3 server" and
succeeded by "not responding".