BACKEND VARA Objects
Use BACKEND VARA objects to execute commands on operating systems (Windows or UNIX) and supply the result as values that are shown in columns. You can store the commands for different operating systems, system names, and versions in one BACKEND VARA object. When the VARA object is resolved, the correct command of the Agent in question is automatically selected and executed. You need a specific privilege to create and modify BACKEND VARA objects.
PromptSet variables are supported in select fields for BACKEND, EXEC, FILELIST, SEC_SQLI, SEC_SQL, SQLI, SQL, and XML variable types. Using PromptSet variables is necessary when using the Dynamic Reload (Combobox Prompts) feature.
You can use the following system variables with BACKEND VARA objects:
Defining BACKEND VARA Objects
A BACKEND VARA object definition is made up of the following pages:
Common to all object types, here you define basic object information and apply custom values to it
Here you define the object-specific settings. Some sections on this page are common to all VARA objects and are described for all of them in dedicated topics. This topic describes the BACKEND-specific settings on the Variables and Commands pages.
- Defining the Commands Page
Common to all object types, here you find a list of all versions of the object
Common to all object types, here you enter information that you consider important to understand the configuration and behavior of the object
In the Variable Settings section, specify how the VARA object is going to access the target system from which it retrieves the values:
Agent where the command is executed
Apply Task Agent
Applies the Agent of the task that uses the VARA object. If the task does not have an Agent (such as, for example, in Script objects), the Agent of the VARA object is used. If neither the VARA object nor the task has an Agent, an error occurs.
Login (LOGIN) object that allows the VARA object to access the target operation system.
Apply Task Login
Applies the login of the task that uses the VARA object. If the task does not have a Login object assigned, (such as, or example, in Script objects), the Login assigned to the VARA object is used. If neither the VARA object nor the task has a Login object, an error occurs.
The following applies for the Agent and Login attributes:
- You can include PromptSet variables here when using the Dynamic Reload (Combobox Prompts) feature for combo box prompts. When you use PromptSet variables in a dynamic Variable object, the Preview feature returns an error. This is because the PromptSet variables do not exist in the dynamic Variable object. However, the PromptSet variables will be resolved when objects including the PromptSet are executed.
- The supplied Predefined BACKEND VARA Objects (Templates) for Backend VARA objects use the PromptSet variables &AGENT# for their specified Agent and &LOGIN# for their login.
- Define the Data Types and Formatting.
- Define the Script Access.
- If you are logged in to Client 0, an additional section is available. For more information, see Client 0 VARA Objects in Other Clients.
BACKEND VARA objects execute exactly one command on the target operating systems. This applies to both Windows and Unix. You enter the command on this page:
In the Windows or UNIX sections specify the following:
Name of the Operating System the Agent is running on. Use the value that is shown in the Administration perspective (Agents page, Software column).
Allowed characters: *
Version of the Agent that is shown in the Administration perspective (Agents page, Software column).
- Windows only supports PowerShell commands.
- You can include PromptSet variables here when using the Dynamic Reload (Combobox Prompts) feature for combo box prompts.
- When you use PromptSet variables in a dynamic Variable object, the Preview feature returns an error. The reason is that the PromptSet variables do not exist in the BACKEND VARA object. However, the PromptSet variables will be resolved when objects including the PromptSet are executed.
Defines how the result should be split into columns. Use the following syntax:
column name:start position(length) [;column name:start position(length) . . .]
- Column name = Name of the column, user-defined
- Start position = Position of the character where the column starts
- Length = Number of characters that determines the column's size
- Semicolons (;) must only be used between several columns. They are not required at the end of the complete definition.
- You must define at least one value column (minimum requirement).
This example splits the output of the command into two columns. The process column starts with the first character and has a length of 20 characters. "pid" starts at character 25 and is 10 characters long.
The commands are not batch lines. You must define a specific program to be executed.
- Listing the directory: cmd /c dir C:\temp
- Ping: ping localhost -n 10
The return code is automatically set to 1 if a command results in an error. In this case, if you use the VARA object within a script, the script aborts. To avoid it, you can append
& set ERRORLEVEL=0at the end of the Windows command.
cmd /c dir /b /o:d C:\temp\*.xml & set ERRORLEVEL=0
This command lists the files of a directory. The return code is always 0, regardless of whether files are found or not. This way you can ensure that the tasks using this VARA object do not abort.
The user who is specified in the Login object must have the right to execute the corresponding command.
Windows and Unix
In the OS Name and Version columns you can filter for the names (such as a particular UNIX derivative) and OS version. The suitable line for the specified Agent is automatically used when the VARA object is executed. The first entry that matches the OS, OS name, and version of the Agent is used.
Root rights are required for the
- Click the Preview button to run the command on the defined computer and test the results.
- Save your changes.
Predefined BACKEND VARA objects are supplied in Client 0 in the UC _RB_VARIABLES folder. They can be used for the Dynamic Reload (Combobox Prompts) feature.
Their Agents are specified using the &AGENT# variable. Their login object is specified using the is &LOGIN# variable. Ensure that you use these names for the PromptSet variables of the required elements.
|Object name||Operating System||Function||Columns|
|UC_RB_VARA_PROCESSLIST||Windows, Linux, AIX, SunOS, HP-UX||
Lists the active processes.
The maximum ProcessID length may differ depending on the UNIX system used. Adjust the column length in the Variable object if necessary.
|UC_RB_VARA_SERVICES_PAUSED||Windows, Linux, AIX, SunOS, HP-UX||Lists all paused services.||Service name|
|UC_RB_VARA_SERVICES_RUNNING||Windows, Linux, AIX, SunOS, HP-UX||Lists all started services.||Service name|
|UC_RB_VARA_SERVICES_STOPPED||Windows, Linux, AIX, SunOS, HP-UX||Lists all stopped services.||Service name|
|UC_RB_VARA_USERLIST||Windows, Linux, AIX, SunOS, HP-UX||
Lists all OS users.
Windows: Active Directory for PowerShell must be installed on the relevant computer.
|User (account) name|