Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The opEvents CLI and API both follow a set of validation rules to maintain data integrity:These validations are on prop-names, which cannot be modified by either CLI or API,

  • Allowed Event Properties: There is a predefined set of properties that events can have. Any input that doesn’t match these predefined properties will not be accepted directly.

  • Custom Properties: To add custom properties, they must be prefixed with "tag_". This convention helps the system distinguish custom properties from standard event properties and may prevent naming conflicts or unwanted data.

  • System-Derived Prop-Names: The system automatically generates or recognises specific property names that can’t be altered, whether through a Command-Line Interface (CLI) or an API. These names are fixed and define the structure of allowed event properties.

List of default prop-names which can not be modified.

Code Block
{
  '_id' => 1,
  'actions' => 1,
  'planned_outage' => 1,
  'node' => 1,
  'nodeinfo' => 1,
  'host' => 1,
  'action_checked' => 1,
  'script' => 1,
  'node_uuid' => 1
};


Custom prop-names can be When new property names are added to opCommon.json under opevents/opevents.
These will then be merged to default props and will invalidate the CLI/API request_list_default_properties, they get merged with the default properties, forming a complete set of properties that the system recognises.

  • However, once this merged set is defined, any attempt to modify these properties directly through CLI or API requests will be invalidated.

Code Block
/opevents/opevents_list_validationdefault_propsproperties : ["details","level","priority"]

...