Fault Log Masking

API Prototype

ascend-fd blacklist Subcommand

Description

This API adds a masking rule that contains fault keywords to prevent information containing fault keywords from being recorded in the file after cleaning logs.

Parameters

Table 1 Parameters of the subcommand

Parameter

Abbreviation

Required (Yes/No)

Value Type

Description

--add

-a

Yes. These parameters are mutually exclusive. That is, only one parameter can be specified.

String

Adds a masking rule that contains keywords.

  • A keyword can contain a maximum of 200 characters, including uppercase letters, lowercase letters, digits, and special characters, such as hyphens (-), periods (.), and slashes (/).
  • A masking rule supports a maximum of 10 keywords. Multiple keywords can be separated by spaces, for example, ERROR FUSION, ERROR "FUSION", or "ERROR" "FUSION".
  • If a keyword contains a backslash (\), the entire keyword must be enclosed in quotation marks to prevent the backslash from being ignored, for example, "ERR\OR".
  • A maximum of 50 masking rules can be saved. If the number of masking rules exceeds 50, the system discards the earliest masking rule and retains the newest one.

--file

-f

String

Imports a JSON file of masking rules. If you add a masking rule by importing a JSON file, the imported JSON file will overwrite the original JSON file in the system.

--delete

-d

Integer

Deletes a masking rule. You can use spaces to separate multiple rules for simultaneous deletion.

--show

-s

String

Views existing masking rules.

--force

None

No

Bool

If this parameter is specified to delete a masking rule or replace a file, no message is displayed for confirmation.

NOTE:

It must be used together with --delete or --file.

--help

-h

No

-

Queries help information.

Return Value

Example: Returns the existing masking rules.

[BLACKLIST]
0. ERROR2, ERROR3, ERROR3
1. ERR1, ERR2, ERR3, ERR4