Document toolboxDocument toolbox

Using the Simple Rule Editor

As its name implies, the Simple Rule Editor provides an easy way to create and edit rules. It establishes a structure in which you can easily add config file matches corresponding to specific configuration commands.

In the Simple Rule Editor, a rule may consist of one or both of the following sections:

  • Config File Must Contain section lists config file matches that must be matched in some combination specified in the associated dropdown list (e.g., ALL of These Lines in Any Order or This BLOCK Only Once). You type in or paste in the sequence of configuration file directives to be matched against.

  • Config File May Not Contain section lists config file matches that should not be matched as specified in the associated dropdown list (Any of These Lines or This BLOCK).

To add config file matches to a rule using the Simple Editor:

  1. Select the rule in the Rules panel.

  2. Select Simple in the Editor list in the upper right corner. (This list is inactive if you are editing an existing rule.)

  3. Then, specify required config file matches:

  4. Open the Config File Must Contain list at the top of the upper panel, then select one of the following options:

    • ALL of These Lines in Any Order

    • ALL of These Lines in Specified Order

    • AT LEAST ONE of These Lines

    • This BLOCK

    • This BLOCK Only Once

    • ONLY ONE of These Lines

  5. Type or paste the config file line(s) or block(s) in the large field in the upper panel. To specify invalid config file matches:

  6. Open the Config File May Not Contain list at the top of the lower panel, then select one of these options:

    • Any of These Lines

    • This BLOCK

  7. Type or paste the config file line(s) or block(s) in the large field in the lower panel. (See references below for additional information.)
    In both the Config File Must Contain and Config File May Not Contain sections, each entered line is considered a regular expression to be matched against the configuration file. If you select one of the BLOCK options, the entire contents of the field are considered a regular expression.

  8. Click the Save button at the bottom of the page.

You can move the bar between the Must Contain and May Not Contain panels to adjust the space available in each panel.

When creating a rule to evaluate a block of config in a specified order, note that the “all of these lines in specified order” logic implies that each line is present and in that order, and there can be other lines in between. In this case, the rule passes. If you do not want to allow other lines in between, use the “Contains This BLOCK” option. Also, in both the “Config File Must Contain” and “Config File May Not Contain” sections, each entered line is considered a regular expression to be matched against the configuration file. If you select one of the BLOCK options, the entire content of the field is considered a regular expression.