Configuring OS command line execution monitor type
You can configure a monitor type to run a script locally on the computer where the PATROL Agent is installed (Windows or Linux). Only a single numeric output of the script is supported.
To configure the monitor type, set the following preferences on the Add Monitoring Configuration window.
Monitoring Solution | Monitor Profile | Monitor Type |
---|---|---|
Scripting | LINUX-UNIX | OS command line execution |
Click Add to configure the scripts.
Field | Description |
---|---|
Script details | |
Name | Enter a display name for the script. A container is created with the script display name. This container holds the attributes for the script instance. Input must match the following regular expression pattern - ^[0-9a-zA-Z._%:-]+$. Example of the display name: cron-monitor.sh, ping3rdParty.sh. |
Script | Enter the absolute path of the script file located on the local device or a shell command. Execution command example: echo 12345;echo Test;ls -la; ps -ef | grep Ag Script path example: For a local script on your computer: /root/xyz_foldername/apps/myAppsCPU.bash Out-of-the-box scripts: $PATROL_HOME\TRO\Conf\Scripts\Samples\<script_name> |
Arguments | Enter the arguments that are passed during the script execution. Separate multiple arguments with a space. Important: A script file that measures the log file size must have the argument of the log file name. |
Content match | In addition to monitoring numeric values, the KM is capable of monitoring a specific text pattern returned by the script during execution. This is useful when you need to enable a certain value where the actual numeric value is the same. The KM scans for the value defined in this field. It returns an annotation text along with the value and the text defined in this field. A single or a semicolon separated list of regular expressions is supported. |
Enable events for single value script annotation | Select this checkbox to enable events for single value script annotation. For more details about single value, see Defining the script output (Linux). |
Credentials | |
User Name | Enter credentials only when you want to execute a script that requires special permissions. For example, if the PATROL Agent user does not have the permission to run a script located in the root directory, you need to provide the credentials to ensure smooth execution of the script. Enter the user name. Important: If this filed is left blank, the PATROL Agent user account is used. |
Password | Enter the password for the user name. |
Confirm Password | Re-enter the password for confirmation. |