OS Command Adapter- Multiple Values

Executes the specified OS command and returns each command output line as a separate value. The metric result is a multi-row, 1 column table.

For example, if the command output is:

em_result=out_x
em_result=out_y

then three columns are populated with values 1,2,3 respectively.

Basic Properties

  • 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 to be appended to the Command.

  • Starts With - The starting string of metric result lines.

    Example: If the command output is:

    em_result=4354
    update
    test
    

    setting Starts With = em_result specifies that only lines starting with em_result will be parsed.

Advanced Properties

  • Input Properties - Additional properties to 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.