Skip to content

Nodes

Nodes is a standard configuration interface for adding, editing and removing the Nodes used by the CAPE Engine. CAPE Nodes contain Perl-based logic to perform custom actions on the data returned by a CAPE Policy or other CAPE Nodes. Additional provided Perl libraries may be used in a Node of Perl code. The list of available Perl libraries can be found in the "Library" section of the documentation.

Refer to the Standard Configuration Interface guide for details on interacting with the grid and form.

This user interface calls REST methods from api/event/nodes.

The UI path for this interface is Configuration -> Events -> CAPE -> Nodes.

Form Fields

  • Name - The name of the CAPE Node.

  • Alias - Optional alias for executing this Node's code from within another CAPE Node.

  • Description - The description of the CAPE Node.

  • Next Node Condition - After the CAPE Node is finished processing, this statement is used to check whether or not the next Node should be executed. This statement is written in Perl and has access to the same variables as the Node Text. Only valid Perl conditions can be used, and will be evaluated to determine a true or false value. For example, the following will execute the next Node only if the Event Severity is Critical:

    $EventData->{Severity} == 5
    
  • Next Node Executed - When the Next Node Condition is evaluated, if the results are TRUE, the Node selected here will be executed. Set to [None] to prevent another Node from being executed.

  • Node Text - This is the Perl code that will be executed when this Node is activated (either directly from a Policy, or by being set to another Node's "Next Node", or by being called as an alias). See below for defined variables. The following variables are available for use in the CAPE Node Rules:

    • NodeID - NodeID from Assure1.ActionCustomNodes.

    • NodeName - NodeName from Assure1.ActionCustomNodes.

    • ProcessFlag - Flag indicating whether the policy is configured for multiple event processing or single event processing. "0" or false means the returned data will be processed one row at a time. Any other value will process all of the returned data at one time.

    • NextNodeID - Next Node to be executed from Assure1.ActionCustomNodes.

    • EventData - Hash reference detailing the event information passed from the Policy or previous Node. The $EventData hash reference can take two forms (defined below), depending on the value of $ProcessFlag, which in turn is dependent on which Event Grouping option was selected in the CAPE Policy. Because $ProcessFlag is set at the Policy level, and because Nodes can be used by multiple Policies, it is possible that a single Node may need to handle both forms of $EventData. This increases the power and flexibility of the Policy/Node system, but also increases the potential complexity of the system.

      • If $ProcessFlag is 0 or any other logically false value, $EventData will be in the same form as it is during Event processing in aggregator rules, where each key is a field from a single Alarms table row (for instance, $EventData->{Summary}, $EventData->{Severity}, etc).

      • If $ProcessFlag is 1 or any other logically true value, $EventData will be a hash reference which contains all Events that matched the policy. Each key is an EventID, and each value is itself a hash reference in the form described above (for instance, $EventData->{12345}->{Summary}, $EventData->{12345}->{Severity}).

Node Text Toolbar

  • Line Numbers - Toggle on/off line numbers.

  • Check Syntax - Run Perl syntax checking on content.

  • Search - Search code.

  • Previous - Previous result for current search.

  • Next - Next result for current search.

  • Replace - Search and replace code.

  • Replace All - Search and replace all in code.