10.1.15.12-06212024

The Syntax for Defining Action Input

The action input for each recommended automation is script-based. When you define a recommended automation in a data view template, the system will generate a JSON script to visualize the default or pre-defined input of the action. To ensure actions can run precisely to meet your expectations, you can customize input parameters in the script, such as data source for data retrieval, thresholds for alerts, and so on.

The built-in syntax can be used to define inputs for the following actions:

    Exception: Action input syntax does not apply to Network Intent, URL, and Runbook Template.

Data View Template 

The "Data View Template" action is used to apply a data view template to a map. Once applied, the action will be documented in a runbook.

JSON Example:

Code
{
"data_source": {
"type": 0,
"frequency": {
"interval": 2,
"times": 10
}
},
"input_variables": {
"multicasting_group_address": "239.1.1",
"vrf": "$vrf",
"vlan": "40"
}
}

The following parameters can be used in the JSON string to define the input for a Data View Template.

ParameterTypeDescriptionOption Values
data_sourceObjectAn object created by NetBrain to contain all settings related to the data source for this Data View Template.N/A
typeNumberThe source to retrieve data.
  • 0 - pull data from the current baseline.
  • 1 - pull data from a live network only once.
  • 2 - pull data from a live network regularly.

By default, the value defined in this Data View Template is used.

frequencyObject

An object created by NetBrain to contain all frequency settings for this Data View Template.

Note: This object and its included parameters are only required when the type is set to 2.

N/A
intervalNumberThe interval to retrieve data. Unit: minutes.

An integer or a decimal (rounding to two decimal places), larger than 0 and less than or equal to 3600.

By default, the value defined in this Data View Template is used.

timesNumberThe number of times for data retrieval.

"Null" or an integer between 1 and 1000.
Tip: "Null" means "unlimited".

By default, the value defined in this Data View Template is used.

input_variablesObject

Include parameters for input variables that are pre-defined in this Data View Template.

Note: This object is only available when input variables are pre-defined in this Data View Template.

N/A

Qapp/Overall Health Monitor 

The "Qapp" or "Overall Health Monitor" action is used to run a Qapp on a map. The action node will be documented in a runbook.

JSON Example:

Code
{
"data_source": {
"type": 0,
"frequency": {
"interval": 2,
"times": 10
}
},
"threshold": {
"High CPU Utilization - Error(>=)": "80",
"High Input Traffic Utilization - Warning(>=)": "60"
},
"input_variables": {
"a": 2,
"b": "b"
}
}

The following parameters can be used in the JSON string to define the input for a Qapp, including the Overall Health Monitor Qapp.

ParameterTypeDescriptionOption Values
data_sourceObjectAn object created by NetBrain, containing all settings related to the data source.N/A
typeNumberThe source to retrieve data.
  • 0 - pull data from the current baseline.
  • 1 - pull data from a live network only once.
  • 2 - pull data from a live network regularly.

By default, the value defined in this Qapp is used.

 frequencyObject

An object created by NetBrain to contain all frequency settings for this Qapp.

Note: This object and its included parameters are only required when the type is set to 2.

N/A
intervalNumberThe interval to retrieve data. Unit: minutes.

An integer or a decimal (rounding to two decimal places), larger than 0 and less than or equal to 3600.

By default, the value defined in this Qapp is used.

timesNumberThe number of times for data retrieval.

"Null" or an integer between 1 and 1000.
Tip: "Null" means "unlimited".

By default, the value defined in this Qapp is used.

thresholdObject

Include parameters for thresholds that are pre-defined in this Qapp.

Note: This object is only available when thresholds are pre-defined in this Qapp.

N/A
input_variablesObject

Include parameters for input variables that are pre-defined in this Qapp.

Note: This object is only available when input variables are pre-defined in this Qapp.

N/A

Gapp 

The "Gapp" action is used to run a Gapp on a map. The action node will be documented in a runbook.

JSON Example:

Code
{
"data_source": {
"type": 1,
"frequency": {
"interval": 2,
"times": 10
}
},
"qapp_nodes": [
{
"qapp_node_id": "7",
"qapp_path": "xxxxxx",
"threshold": {
"High Input Traffic Utilization - Warning(>=)": "60"
},
"input_variables": {
"a": 1,
"b": "b"
}
}
]
}

The following parameters can be used in the JSON string to define the input for a Gapp.

ParameterTypeDescriptionOption Values
data_sourceObjectAn object created by NetBrain, containing all settings related to the data source.N/A
typeNumberThe source to retrieve data.
  • 0 - pull data from the current baseline.
  • 1 - pull data from a live network only once.
  • 2 - pull data from a live network regularly.

By default, the value is 1.

frequencyObject

An object created by NetBrain to contain all frequency settings for this Gapp.

Note: This parameter is only required when the type is set to 2.

N/A
intervalNumberThe interval to retrieve data. Unit: minutes.

An integer or a decimal (rounding to two decimal places), larger than 0 and less than or equal to 3600.

By default, the value is 2.

timesNumberThe number of times for data retrieval."Null" or an integer between 1 and 1000.
Tip: "Null" means "unlimited".
qapp_nodesArray<Object>

An object created by NetBrain to contain the information about each Qapp referenced in this Gapp.

Note: This object is only required when a Qapp contains thresholds or input variables.

N/A
qapp_nodes_idStringThe unique Qapp ID in this Gapp.Note: Keep the default value as it is.
qapp_pathStringThe location of this Qapp file.Note: Keep the default value as it is.
thresholdObject

An object created by NetBrain to contain all threshold settings for this Gapp.

Note: This object is only available when thresholds are pre-defined in this Gapp.

N/A
  input_variablesObject

An object created by NetBrain to contain all input settings for this Gapp.

Note: This object is only available when input variables are pre-defined in this Gapp.

N/A

Execute CLI Commands 

The "Execute CLI Commands" action is used to issue CLI commands to devices on a map. The action node will be documented in a runbook.

JSON Example:

Code
{
"commands": [
"show version",
"show interface"
],
"templates": [
"Public/OSPF Command Template",
"Private/QoS Command Template"
]
}

The following parameters can be used in the JSON string to define the input for executing CLI commands.

ParameterTypeDescription
commandsArray<String>Commands to be executed.
templatesArray<String>

The location of referenced command templates.

Note: The referenced command templates must exist in the system.

Compare Data 

The "Compare Data" action compares various data between two data sets. The action node will be documented in a runbook.

JSON Example:

Code
{
"data_set1": 0,
"data_set2": 1,
"compare_data": [
"Configuration File",
"Route Table",
"NCT Table/IPsec VPN Table",
"NCT Table/IPsec VPN Table[Real-time]"
]
}

The following parameters can be used in the JSON string to define the input for comparing device data.

ParameterTypeDescriptionOption Values
data_set1NumberThe data source for dataset1.
  • 0 - pull data from the current baseline.
  • 1 - pull data from a live network.

The default value is 0.

data_set2NumberThe data source for dataset2.
  • 0 - pull data from the current baseline.
  • 1 - pull data from a live network.

The default value is 1.

compare_dataArray<String>Include the data types for comparison.
  • Null or empty array - represents all data.
  • Built-in data: Configuration File, Route Table, ARP Table, MAC Table, NDP Table, STP Table, BGP Advertised-Route Table.
  • NCT table: starting with "NCT Table/".
    Note: All types of NCT tables available in the system can be auto-completed. However, whether a defined NCT table applies to an actual device depends on its driver definition.

Verify Application 

The "Verify Application" action is used to verify applications and paths. The action node will be documented in a runbook.

JSON Example:

Code
{
"data_source": 1,
"options": {
"top_relevant_application": 3
"top_path_of_application": 3
"use_config_in_current_baseline": true,
"l3_active_path": false,
"use_cli_with_arguments": false
"calculate_when_deny_by_acl": false,
"calculate_when_deny_by_policy": false
"path_fix_up": true
}
}

The following parameters can be used in the JSON string to define the input for verifying applications.

ParameterTypeDescriptionOption Values
data_sourceNumberThe source to retrieve data.
  • 0 - pull data from the current baseline.
  • 1 - pull data from a live network.

The default value is 1.

top_relevant_applicationNumberThe count of the most relevant applications based on application weight.An integer between 1 and 100.
The default value is 3.
top_path_of_applicationNumberThe count of the most relevant paths in each application based on path weight.An integer between 1 and 100.
The default value is 3.
use_config_in_current_baselineBoolDetermines whether to use the configuration file in the current baseline.The default value is true.
l3_active_pathBoolDetermines whether to calculate L3 Active Path.The default value is false.
use_cli_with_argumentsBoolDetermines whether to use CLI commands with arguments.The default value is false.
calculate_when_deny_by_aclBoolDetermines whether to continue calculating path with ACL deny.The default value is false.
calculate_when_deny_by_policyBoolDetermines whether to continue calculating path with policy deny.The default value is false.
path_fix_upBoolDetermines whether to enable Path fix-up rules.The default value is true.

SPOG URL 

The "SPOG URL" action is used to generate an URL displayed on a data view position to redirect to the third-party systems.

Information Note: This recommended automation is only available at the device level.

JSON Example:

Code
{
"customized_variables": {
"@var1": "239.1.1",
"@var2": "$vrf",
"@var3": "40"
}
"link_on_columns": [
"mask"
"ip1"
]
}

The following parameters can be used in the JSON string to define the input for SPOG URL.

ParameterTypeDescriptionOption Values
customized_variablesObject

A placeholder in SPOG URL to feed different values for different data units.

Note: This object is only available when at least one customized variable is pre-defined in this SPOG URL.

N/A
link_on_columnsArray<String>The name of a table column where the SPOG URL will be displayed.N/A

View Device Data 

The "View Device Data" action is used to launch the view of device data, including configurations and various data tables.

Information Note: This recommended automation is only available at the device level.

JSON Example for Configuration File:
Code
{
"filter": "BGP/All BGP Configuration"
}

The following parameter can be used in the JSON string to define the input for viewing configuration files.

ParameterTypeDescriptionOption Values
filterStringA configuration filter.

Non-empty string.

The default value is Full Configuration.


JSON Example for Route Table, ARP Table, BGP-Advertised Route Table, NCT Table:

Code
{
"sub_name": "$vrf_name"
}

The following parameter can be used in the JSON string to define the input for viewing data tables.

Information Note: Input syntax does not apply to MAC Table and NDP Table.
ParameterTypeDescriptionOption Values
sub_nameStringThe sub name of the table.

Any string (empty string is allowed).

  • NCT Table - its default value is empty ("").
  • Route Table/BGP-Advertised Route Table - its default value is global.

Ping 

The "Ping" action is used to ping a destination device from a source device. This action will be documented in a runbook.

Information Note: This recommended automation is only available at the device level.

JSON Example:

Code
{
"source": {
"type": 0,
"device": "$this",
"interface": "$mgmt_interface"
},
"destination": {
"device": "$this",
"interface": "$mgmt_interface"
},
"options": {
"timeout": 2,
"packet_size": 64,
"packet_count": 5,
"no_fragment": false
}
}

The following parameters can be used in the JSON string to define the input for Ping.

ParameterTypeDescriptionOption Values
source.typeNumberThe type of the source device.
  • 0 - Front Server
  • 1 - Device name/IP address/DNS name

The default value is 0.

source.deviceString

The device/DNS name, or IP address of the source device when source.type is set to 1.

Note: If source.type is set to 0, the configured value of source.device will be ignored and Front Server will be auto-selected.

Either a non-empty string or "$this".

The default value is $this, which represents the current device.

source.interfaceString

The interface name or IP address of the source device when source.type is set to 1.

Note: If source.type is set to 0, the configured value of source.interface will be ignored.

An interface name or an interface IP address. It also supports a combination of interface name and IP address (separated by space).

The default value is null, which represents auto-selected.

destination.deviceStringThe device/DNS name, or IP address of the destination device.

Either a non-empty string or "$this".

The default value is $this, which represents the current device.

destination.interfaceStringThe interface name or IP address of the destination device.

An interface name or an interface IP address. It also supports a combination of interface name and IP address (separated by space).

The default value is null, which represents Management IP.

timeoutNumberThe timeout threshold for no reply.An integer between 0 and 3600.
The default value is 2 seconds.
packet_sizeNumberThe packet size for the echo.An integer between 36 and 18024.
The default value is 64 bytes.
packet_countNumberThe packet count for the echo.An integer between 1 and 1024.
The default value is 5.
no_fragmentBoolJudge whether no fragment is required.The default value is false.

Traceroute 

The "Traceroute" action is used to trace routes from a source device to a destination device. This action will be documented in a runbook.

Information Note: This recommended automation is only available at the device level.

JSON Example:

Code
{
"source": {
"type": 0,
"device": "$this",
"interface": "$mgmt_interface"
},
"destination": {
"device": "$this",
"interface": "$mgmt_interface"
},
"options": {
"timeout": 3,
"max_hops": 30,
}
}

The following parameters can be used in the JSON string to define the input for Traceroute.

ParameterTypeDescriptionOption Values
source.typeNumberThe type of the source device.
  • 0 - Front Server
  • 1 - Device name/IP address/DNS name

The default value is 0.

source.deviceString

The device/DNS name, or IP address of the source device when source.type is set to 1.

Note: If source.type is set to 0, the configured value of source.device will be ignored and Front Server will be auto-selected.

Either a non-empty string or "$this".

The default value is $this, which represents the current device.

source.interfaceString

The interface name or IP address of the source device when source.type is set to 1.

Note: If source.type is set to 0, the configured value of source.interface will be ignored.

An interface name or interface IP address. It also supports a combination of interface name and IP address (separated by space).

The default value is null, which represents auto-selected.

destination.deviceStringThe device/DNS name, or IP address of the destination device.

Either a non-empty string or "$this".

The default value is $this, which represents the current device.

destination.interfaceStringThe interface name or IP address of the destination device.

An interface name or an interface IP address. It also supports a combination of interface name and IP address (separated by space).

The default value is null, which represents Management IP.

timeoutNumberThe timeout threshold for no reply.An integer between 1 and 3600.
The default value is 3 seconds.
max_hopsNumberThe maximum number of hops.An integer between 1 and 100.
The default value is 30.

Calculate Path  

The "Calculate Path" action is used to calculate a traffic path from a source device to a destination device. This action will be documented in a runbook.

Information Note: This recommended automation is only available at the device level.

JSON Example:

Code
{
"protocol": "IPv4",
"source": {
"device": "$this",
"port": 2033
},
"destination": {
"device": "$this",
"port": 2033
},
"direction": 1,
"data_source": 1,
"options": {
"use_config_in_current_baseline": true,
"l3_active_path": false,
"use_cli_with_arguments": false
"calculate_when_deny_by_acl": false,
"calculate_when_deny_by_policy": false
"path_fix_up": true
}
}

The following parameters can be used in the JSON string to define the input for path calculation.

ParameterTypeDescriptionOption Values
protocolStringThe designated protocol for path calculation.The default value is IPv4.
source.deviceStringThe device/DNS name, or IP address of source device.

A non-empty string or "$this".

The default value is $this, which represents the current device.

source.portNumber

The port number of the source device.

Note: This parameter is only required when the designated protocol requires a port number.

An integer between 0 and 65535.

The default value is 0.

destination.deviceStringThe device/DNS name, or IP address of the destination device.

A non-empty string or "$this".

The default value is $this, which represents the current device.

destination.portNumber

The port number of the destination device.

Note: This parameter is only required when the designated protocol requires a port number.

An integer between 0 and 65535.

The default value is 0.

directionNumberThe direction for path calculation.
  • 1 - one-way path.
  • 3 - two-way path.

The default value is 1.

data_sourceNumberThe source to retrieve data.
  • 0 - pull data from the current baseline.
  • 1 - pull data from a live network.

The default value is 1.

use_config_in_current_baselineBoolJudge whether to use the configuration file in the current baseline.The default value is true.
l3_active_pathBoolJudge whether to calculate L3 Active Path.The default value is false.
use_cli_with_argumentsBoolJudge whether to use CLI commands with arguments.The default value is false.
calculate_when_deny_by_aclBoolJudge whether to continue calculating path with ACL deny.The default value is false.
calculate_when_deny_by_policyBoolJudge whether to continue calculating path with policy deny.The default value is false.
path_fix_upBoolJudge whether to enable Path fix-up rules.The default value is true.

 Overall Health View

The "Overall Health View" action is used to display overall health info. This action will be documented in a runbook.

Information Note: This recommended automation is only available at the device level.

JSON Example:

Code
Overall Health View:

{
"data_source": {
"type": 2,
"frequency": {
"interval": 2,
"times": 10
}
}
}

The following parameters can be used in the JSON string to define the input for the Overall Health View action.

ParameterTypeDescriptionOption Values
data_sourceObjectAn object created by NetBrain to contain all settings related to the data source for this Overall Health View.N/A
typeNumberThe source to retrieve data.
  • 0 - pull data from the current baseline.
  • 1 - pull data from a live network only once.
  • 2 - pull data from a live network regularly.

By default, the value defined in this Overall Health View is used.

frequencyObject

An object created by NetBrain to contain all frequency settings for this Overall Health View.

Note: This object and its included parameters are only required when the type is set to 2.

N/A
intervalNumberThe interval to retrieve data. Unit: minutes.

An integer or a decimal (rounding to two decimal places), larger than 0 and less than or equal to 3600.

By default, the value defined in this Overall Health View is used.

timesNumberThe number of times for data retrieval.

"Null" or an integer between 1 and 1000.
Tip: "Null" means "unlimited".

By default, the value defined in this Overall Health View is used.