Tool runtime parameters

The parameters that you can use in tools are described here. The values of parameters are determined at run time. Before you use a parameter in a tool command, check that the parameter is supported by the tool type.

How to use run time parameters in tools

For CGI/URL tools, write the parameters into the URL and enclose the parameters in braces, as shown in the following example.

$(SERVER)cgi-bin/tool.cgi?hostname={$prompt.hostname}

For command-line and script tools, enclose parameters in braces, as shown in the following example.

start cmd /k %WINDIR%\SYSTEM32\PING.EXE {$prompt.hostname}

For conversions, enclose the CONVERSION keyword in the braces. Braces are not required for parameters in SQL tools (including in the Journal component).

Supported parameters

The following table lists the runtime parameters that you can write into tool commands, and lists which parameters are supported for each tool type. Where support is stated for SQL tools, the support extends to the SQL journal functions.

Table 1. Runtime parameters that can be used in tools
Parameter name Supported in these tool type Description
@fieldname CGI/URL, SQL, command-line, script Use this parameter to obtain the value of a field from the alerts.status table of an ObjectServer. For example, @serial. When the tool is executed, fieldname resolves to the value of the specified field for the selected row in the event list.
$selected_rows.fieldname CGI/URL1, SQL, command-line, script Use this parameter to obtain the values of multiple fields from the alerts.status table. When the tool is executed, fieldname is resolved to a comma-separated string of the field values of all the selected rows.
Important: To avoid performance degradation, clear the Execute for each selected row check box in the tool configuration when you write this parameter into the tool command.

For multiple data sources, use the $selected_rows.serial parameter in combination with the $selected_rows.datasource parameter. This combination ensures that no duplicate serials are returned by tools because a unique combination of serial and data source is returned.

$prompt.promptname CGI/URL, SQL, command-line, script Use this parameter to declare a prompt in a tool command. promptname is the name of a defined prompt. When the tool is executed, this variable is resolved to the prompt value. If a prompt contains multiple values, the value can be a comma-separated list.
%username CGI/URL, SQL, command-line, script username is resolved to the user name of the user. If the user is not an ObjectServer user, the #unknownUser string is substituted.
%datasource CGI/URL2, SQL, command-line, script Use this parameter to obtain the name of a data source. When the tool is executed, the parameter resolves to the name of the data source that is defined for the event feed.
%cookie.cookiename CGI/URL, command-line, script Resolves to the value of the cookie that is specified by cookiename. If the specified cookie is not available, an empty string is returned.
$param.parametername Script Use this parameter to obtain the value of a widget parameter in an Event Viewer or an applet parameter in an AEL. When the tool is executed, parametername is resolved to the value of the widget or applet parameter. If no parameter is available, an empty string is returned.
$selected_rows.datasource CGI/URL, SQL, command-line, script Identifies the data source in which the row originates. This parameter does not resolve to an ObjectServer field. Use this parameter for tools that are to be run against events from multiple data sources, to distinguish between identical data from different data sources.
CONVERSION(@fieldname) CGI/URL, SQL, command-line, script Use this parameter to obtain the conversion value of a field from the alerts.status table. When the tool is executed, fieldname is resolved to the conversion value of the field for the selected row. For example: Alert prioritized from CONVERSION(@Severity).
CONVERSION($selected_rows.fieldnames) CGI/URL3, SQL, command-line, script Use this parameter to obtain the conversion values of multiple fields from the alerts.status table. When the tool is executed, fieldnames is resolved to a comma-separated string of the conversion values of the fields for the selected rows.
Important: To avoid performance degradation, clear the Execute for each selected row check box in the tool configuration when you write this parameter into the tool command.
CONVERSION($prompt.promptname) CGI/URL, SQL, command-line, script promptname is the name of a prompt. When the tool is executed, this variable is resolved to the prompt label (as opposed to the prompt value). For example, Alert assigned to CONVERSION($prompt.userassign).
1 This parameter can also be implicitly inserted through the selection of fields during CGI/URL tool creation. At run time, the field resolves to the $selected_rows.fieldname parameter.
2 At run time, the CGI/URL tool inserts the data source parameter even if this parameter is not explicitly set during tool creation.
3 This parameter can also be implicitly inserted through the selection of fields during CGI/URL tool creation. At run time, the field resolves to the CONVERSION.$selected_rows.fieldname parameter.