Updated on 2024-07-18 GMT+08:00

Creating and Editing a Parser

Scenario

By default, SecMaster has a built-in quick access parser. You can select a parser as required.

Table 1 Parser scenario description

Type

Scenario

Quick access

The source data can be directly transmitted without being processed.

Template

When you need to clear data sources or process fields, you can select a template based on the application scenario and create a parser.

Custom

You can create custom parsers and configure parsing rules to meet your needs, such as clearing data sources, processing fields, and more.

This topic describes how to create and edit a parser.

Creating a Parser

  1. Log in to the management console.
  2. Click in the upper part of the page and choose Security > SecMaster.
  3. In the navigation pane on the left, choose Workspaces > Management. In the workspace list, click the name of the target workspace.
  4. In the navigation pane on the left, choose Settings > Collection Management. On the displayed page, click the Parsers tab.
  5. Customize a parser or create a parser from a template.

    • Customizing a parser
      1. On the Parsers tab page, click Add.
      2. On the Parsers tab page, set parameters.
        Table 2 Parameters for adding a parser

        Parameter

        Description

        Basic Information

        Parser Name

        Set the parser name.

        Description

        Enter the parser description.

        Rule list

        Set the parsing rule of the parser. Perform the following steps:

        1. Click Add and select a rule type.
          • Parsing rule: Select the parsing rule of the parser. For details about the parameters, see Rules for Configuring Parsers.
          • Conditional control: Select the conditions for the parser. You can select If, Else, or Else if.
        2. Set parameters based on the selected rule.
      3. After the setting is complete, click OK in the lower right corner of the page to confirm the setting.
    • Creating a parser from a template
      1. On the Parsers tab page, click the Templates tab.
      2. On the displayed page, locate the row that contains the target template, click Created by Template in the Operation column.
      3. On the Parsers tab page, set parameters.
        Table 3 Parameters for adding a parser

        Parameter

        Description

        Basic Information

        Parser Name

        Parser name, which is automatically generated by the system based on the template and can be changed.

        Description

        Parser description, which is automatically generated by the system based on the template and can be modified.

        Rule list

        Parsing rule, which is automatically generated by the system based on the template and can be modified.

        To add a rule, click Add, select a rule type, and set parameters based on the selected rule.

        • Parsing rule: Select the parsing rule of the parser. For details about the parameters, see Rules for Configuring Parsers.
        • Conditional control: Select the conditions for the parser. You can select If, Else, or Else if.
      4. After the setting is complete, click OK in the lower right corner of the page to confirm the setting.

Editing a Parser

  1. Log in to the management console.
  2. Click in the upper part of the page and choose Security > SecMaster.
  3. In the navigation pane on the left, choose Workspaces > Management. In the workspace list, click the name of the target workspace.
  4. In the navigation pane on the left, choose Settings > Collection Management. On the displayed page, click the Parsers tab.
  5. On the Parsers tab, locate the row containing your desired parser and click Edit in the Operation column.
  6. In the Edit Parser dialog box, edit the parser information.

    Table 4 Editing a parser

    Parameter

    Description

    Basic Information

    Parser Name

    Set the parser name.

    Description

    Enter the parser description.

    Rule list

    Set the parsing rule of the parser. Perform the following steps:

    Click Add and select a rule type.

    • Parsing rule: Select the parsing rule of the parser. For details about the parameters, see Rules for Configuring Parsers.
    • Conditional control: Select the conditional control principle of the parser.

  7. After the setting is complete, click OK in the lower right corner of the page to confirm the setting.