Defining the script output
Single value
The script output must return a number at the first line that will be presented in the static monitor type named Script within the Value parameter. All the lines starting with the second line will be attached to the parameter value as an annotation.
Example
A script that invokes HTTP GET request and prints the HTTP RC and the page content
Multiple instances
The script output should return multiple lines, where each line simulates an instance with its corresponding parameters. The new instances will be displayed as a new monitor types (dynamic monitor types based on the script output) with the corresponding parameters.
If the script output is based on multiple instances then the Script value parameter in the LINUX-UNIX shell script monitor type will be set to value 0 since it is not relevant for multiple instances output base (the Script value attribute is relevant only if the script output is considered as single value option).
Defining each line in the script output
With the output metadata
MonitorTypeName=instanceName1,parameter1=value,parameter2=value,parameterN=value
MonitorTypeName=instanceName2,parameter1=value,parameter2=value,parameterN=value
MonitorTypeName=instanceNameN,parameter1=value,parameter2=value,parameterN=value
where,
MonitorTypeName is the static name of the monitor type that is created to group all of the instances
instanceName is the instance name. This is a dynamic name. Each instance will be created in the MonitorTypeName container. This instance will hold all the user defined parameters.
parameter is the name of the parameter that will provide the value for each instance
Structure
+ MonitorTypeName
+ instanceName1
parameter1
parameter2
parameterN
+ instanceName2
parameter1
parameter2
parameterN
+ instanceNameN
parameter1
parameter2
parameterN
Without parameter names
MonitorTypeName=instanceName1,value,value,value
MonitorTypeName=instanceName2,value,value,value
MonitorTypeName=instanceNameN,value,value,value
where,
MonitorTypeName is the static name of the monitor type that is created to group all of the instances
instanceName is the instance name. This is a dynamic name. Each instance will be created in the MonitorTypeName container. This instance will hold all the user defined parameters.
parameter is none. The name of the parameters will be Value1,Value2,ValueN
Structure
+ MonitorTypeName
+ instanceName1
Value1
Value2
ValueN
+ instanceName2
Value1
Value2
ValueN
+ instanceNameN
Value1
Value2
ValueN
Example1
A script that returns the interfaces of the device. For each interface the script returns three parameters, InErr, OutErr, and Speed
Example 2
A script that returns the interfaces of the device. For each interface the script returns three parameters values, without the parameters names