Administer > Monitoring > Policy Templates > Pattern Matching in Policy Rules > User-Defined Variables in Patterns

User-Defined Variables in Patterns

Any matched string can be assigned to a variable, which can be used to compose events. To define a parameter, add ". parametername " before the closing bracket. The pattern:

    ^errno: <#.number> - <*.error_text>

matches an event such as:

    errno: 125 - device does not exist 

and assigns "125" to number and "device does not exist" to error_text.

When using these variables, the syntax is <variable_name> (for example, <number>).