FAQ


This section addresses common questions about using and configuring the KM and scripts.

Does the KM run a script that requires data from other files?

Yes, the PATROL for Scripting KM runs a script that requires data from other files. To run a script file with other files (for example, data) that are bundled with the script, add all the files along with the script file to a .zip or .tar file on the PATROL Agent file system. Enter the absolute path of the .zip or .tar file in the Script field while configuring a policy. The .zip or .tar file name must have the same name as the base script for the KM to upload the content of the file to the target host. For example, if the policy is defined with /tmp/myScriptDir/myScript.sh value, the zip file name must be myScript.zip, on the PATROL Agent file system.

Alternatively, to run a script file with other files, add all the files to a folder and add the following field at the first line of the script file:
requires <absolute path of the folder where all required files are located>

Along with the script file, the KM would copy the files mentioned in the folder and would run them with the script.

Does the KM run the scripts that generate multiple output instances?

To run a script with multiple output instances, use the following monitor types:

  • For Linux (remote and local script execution) - LINUX-UNIX shell scripts
  • For Windows (remote and local script execution) - Windows PowerShell
What script file types does the KM support?

By default, the KM supports the following script file types:

  • .pl=perl
  • .plx=perl
  • .py=python
  • .php=C:\php\php.exe

To execute a script file with any other extension, create an entry for the extension in the following file and restart PATROL Agent:

  • Windows: %PATROL_HOME%\TROMS\Conf\Properties\runtimeExtensions.properties
  • Linux: $PATROL_HOME/TRO/Conf/Properties/runtimeExtensions.properties

In the runtimeExtensions.properties file, ensure that the ApplyRuntime variable is set to true.

Does the KM support mapping instance name to a device?

Yes, you can map instance name to a device. For more information, see Mapping instances to devices.

Is it possible to assign unit to script output?

Yes, you can assign a unit to the script output. For more information, see Configuring-metadata-for-script-outputs.

Is it possible to mark a script output as KPI?

Yes, you can mark a script output as key performance indicator. For more information, see Configuring-metadata-for-script-outputs.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*