OS Command Adapter - Multiple Columns
Executes the specified OS command and parses each command output line (delimited by a user-specified string) into multiple values. The metric result is a mult-row, multi-column table.
Example: If the command output is
em_result=1|2|3 em_result=4|5|6
and the Delimiter is set as "|", then there are two rows of three columns each:
Basic Properties
The complete command line will be constructed as: Command + Script + Arguments
-
Command - The command to execute. For example, %perlBin%/perl.
-
Script - A script to pass to the command. For example, %scriptsDir%/myscript.pl. You can upload custom files to the agent, which will be accessible under the %scriptsDir% directory.
-
Arguments - Additional arguments.
-
Delimiter - The string used to delimit the command output.
-
Starts With - The starting string of metric result lines.
Example: If the command output is
em_result=4354 out_x out_y
setting Starts With = em_result specifies that only lines starting with em_result will be parsed.
-
Input Properties - Additional properties can be passed to the command through its standard input stream. For example, you can add Input Property: Name=targetName, Value=%NAME%, which the command can read through it's standard input stream as STDINtargetName=<target name>. To specify multiple Input Properties, enter each property on its own line.
-
Environment Variables - Additional properties can be accessible to the command from environment variables. For example, you can add Environment Variable: Name=targetType, Value="%TYPE%", and the command can access the target type from environment variable "ENVtargetType".
Advanced Properties
-
Input Properties - Additional properties can be passed to the command through its standard input stream. For example, you can add Input Property: Name=targetName, Value=%NAME%, which the command can read through its standard input stream as STDINtargetName=<target name>. See usage examples in OS Command Adapter - Single Columns.
-
Environment Variables - Additional properties can be accessible to the command from environment variables. For example, you can add Environment Variable: Name=targetType, Value="%TYPE%", and the command can access the target type from environment variable "ENVtargetType". See usage examples in OS Command Adapter - Single Columns.
Note:
Value="%TYPE%" may not be applicable for certain target-types (for example: host, wls). For such target types, use Value=TYPE instead.
Credentials
-
Host Credentials - The credential used to launch the OS Command. See usage examples in OS Command Adapter - Single Columns.
-
Input Credentials - Additional credentials passed to the OS Command's standard input stream. See usage examples in OS Command Adapter - Single Columns.