addTopologyNode
A Workflow Engine function that creates a node in the named topology. The node name can be static or a substitution value. To substitute a value, use $(<attribute_name>). For example $(source). Creates the named topology if the it does not exist. As a best practice, set 'first match only' for this action.
This function is available for alert workflows.
Back to Workflow Engine Functions Reference.
Arguments
Workflow Engine function addTopologyNode
takes the following arguments:
Name | Required | Type | Description |
---|---|---|---|
topologyName | yes | string | The name or substited value for the topology. To substitute a value, use $(<attribute_name>). For example $(custom_info.myTopology). |
nodeName | yes | string | The name or substituted value for the 'A' endpoint (source node). To substitute a value, use $(<attribute_name>). For example $(custom_info.node). |
description | no | string | Optional node description. When not supplied, defaults to the time, date, and the triggering alert id. |
Example
The following example demonstrates typical use of Workflow Engine function addTopologyNode
.
If you want to create a node in the topology "My Network" for the alert source, set the following:
topologyName
: my network)
sourceNode
: $(source)
The UI translates your settings to the following JSON:
{"topologyName":"my network","nodeName":"$(source)"}
For an alert where source
= sflinux101, you can run the topologies
API to see your new node:
curl -X GET 'https//example.com/api/v1/topologies/my%20network/nodes '
Returns the following:
[{ "name": "sflinux101", "description": "Automatically created node: triggering alert # 35 @ 2020-05-08T02:14:05.680Z" }]