Variables Overview

Riverbed IQ enables you to use variables in runbooks so that runbook data can be stored and exchanged with other applications. For example, you can use variables to do things like pass in information from a Slack message, or pass out data to an ITSM tool like ServiceNow. Riverbed IQ furnishes a number of built-in variables, and you can define custom variables, as well. Variables (built-in and custom) are accessed via the x button in the Runbook Editor's tool bar. Define variables in the Variable Definition Editor, and set their values in the Set Primitive Variable and Set Structured Variable nodes.

At this time, all variables are runtime scope variables, meaning that they are persistent over a single execution of a runbook.

Primitive and Structured Variables

A primitive (simple) variable represents a single discrete value. Set the values of primitive variables in the Set Primitive Variable node using a Liquid template. You can set the values of multiple primitive variables in a single Set Primitive Variable template.

A structured (complex) variable represents output that is summarized or aggregated from preceding nodes in the runbook, representing complex summarized data or complex time series data. Set the values of structured variables in the Set Structured Variable node. Structured variables can be used as filters in Data Ocean nodes; the structured variable type (e.g., "Application") defines what is available in the variable, and, consequently, where it can be used for filtering (e.g. application filter).

Syntax

Variables are named with syntax like, "runtime.interval_start" and "runtime.input.device.<property>", where "runtime" indicates the variable's scope, and "<property>" stands for a device property used in the runbook. You could define a custom variable named, "runtime.MyCustomVariable".

Assign a value to a variable using the appropriate Variable node, Set Primitive Variable or Set Structured Variable. The node properties provide a field for assigning a value using a Liquid template. Some examples follow:

For a runtime scope variable of type integer named "myInt":

{

"runtime.myInt": "1948"

}

To assign that variable, "myInt" to the value of another variable ("anotherInt") multiplied by two:

{

"runtime.myInt": "{{ variables["runtime.anotherInt"]| times 2}}"

}

To assign that variable, "myInt" to the input to the node:

{

"runtime.myInt": "{{node_input.output.data[0].data.throughput }}"

}