Updated on 2024-06-11 GMT+08:00

Step 2: Create a Rule Template

Scenarios

You can create rule templates based on different service scenarios.

Constraints

All rules in the templates are meet requirements.

Up to 10 rule templates can be created.

Procedure

  1. Log in to the UGO console.
  2. In the navigation pane on the left, choose SQL Audit > Rules. The Templates page is displayed by default.
  3. Click Create Template. In the displayed dialog box, configure parameters as needed.

    Figure 1 Creating a rule template
    Table 1 Parameter description

    Parameter

    Description

    Template Name

    The template name cannot be same as the existing template names.

    The name must contain 5 to 50 characters, start with a letter, digit, and end with a digit or letter. Only letters (case-insensitive), digits, underscores (_), and hyphens (-) are allowed.

    Template Type

    You can select Baseline Template or Import Template.

    Import Template

    You need to import a local file template. The file requirements are as follows:

    1. The file size cannot exceed 1 MB.

    2. The file name can contain only digits, letters, underscores (_), and hyphens (-).

    3. The file name cannot exceed 240 characters.

    4. The columns must be arranged according to the sequence in the template. It is recommended that the data format of each column be TEXT to prevent deviation during data conversion.

    5. No blank line is allowed between two rows of data, or the data after the blank line will be invalid. The number of rows cannot exceed 200, or the data after 200th row will be invalid.

    NOTICE:

    You are advised to modify rules in the exported Excel file template. For details, see Table 2. You are advised to modify the value of the Threshold, Risk Level, and Suggestion columns.

    Baseline Template

    You can select any existing template as the baseline template. The applicable database cannot be changed.

    Description

    (Optional) The description contains up to 100 characters.

    Table 2 Example of file template

    Rule Name

    Rule ID

    Description

    Applicable Database

    Audited Object Type

    Severity

    Threshold

    Suggestion

    Do not use too many combined index fields.

    10055

    The number of composite index fields cannot exceed the threshold. Audit object: CREATE INDEX

    gauss

    sqltext

    Major

    5

    -

  4. Click OK.

    The created template is displayed in the template list. Up to 10 custom templates can be created.
    Figure 2 Viewing the template you created