Fault Entity Customization

API Prototype

ascend-fd entity Subcommand

Description

This API provides functions related to fault entity customization, including adding, modifying, querying, and deleting custom fault entities, and verifying the custom-ascend-kg-config.json file of custom fault entities.

Parameters

Table 1 Parameters of the subcommand

Parameter

Abbreviation

Required (Yes/No)

Value Type

Description

--update

-u

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

String

Adds or modifies the information about custom fault entities in a JSON file.

NOTE:

For details about the parameters in the JSON file, see Table 1.

--delete

-d

String

Deletes the information about custom fault entities with specified fault codes. Multiple fault codes are separated by spaces.

--show

-s

String

Queries the custom fault entity information. You can view fault information by fault code. Multiple fault codes are separated by spaces. If no fault code is specified, information about all custom fault entities is queried.

--check

-c

String

Verifies the validity of the custom-ascend-kg-config.json file, especially the validity of the field attributes of each custom fault entity.

--item

None

No

String

Queries some information about a custom fault entity. Multiple fields are separated by spaces. If no field is specified, the following three fields are displayed:

  • attribute: attribute information
  • rule: fault chain
  • regex: fault keyword
NOTE:

It must be used together with --show (or -s).

--force

-f

No

Bool

If this parameter is specified to delete a custom fault entity, no message is displayed for confirmation.

NOTE:

It must be used together with --delete (or -d).

--help

-h

No

-

Queries help information.

Return Value

Example: Use a JSON file to add a custom fault entity.

ascend-fd entity -u test_base.json
Updated entity successfully.