Configuring LINUX-UNIX shell script monitor type
Enter the remote device details and configure a script that can be executed on the remote Linux computer.
Field | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Click | |||||||||||||||||||
Device details | |||||||||||||||||||
Device name/IP | Enter a host name or an IP address. The name can be short or long. The KM uses this value when setting up the SSH connection to the targeted device. Input must match ^[0-9a-zA-Z._%:-]+$ regular expression pattern. | ||||||||||||||||||
Forced IP Address | (Optional) Enter the IP address of the device you want to monitor. You can leave this field blank if you have provided the real host name or an IP address in the Device name/IP field. Input must match [^(?:(^((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?):{1,2}((?:[0-9A-Fa-f]{1,4}(?:: | ||||||||||||||||||
Category | Enter a category name to group the devices. A container is created with the category name. Input must not contain <>\/|":*?]] characters. | ||||||||||||||||||
Port | Enter the SSH port number to connect to the device. The default port number is 22. | ||||||||||||||||||
Timeout (sec) | Enter the connection timeout period in seconds. A targeted device might not be available or might be very slow to respond. In such scenarios, ensure that The minimum value is 1 second and the maximum value is 600 seconds. Default value is 5 seconds. | ||||||||||||||||||
Poll interval (sec) | The PATROL Agent maintains it’s set of SSH connections to all targeted hosts. If a connection breaks then the PATROL Agent can reconnect smoothly. | ||||||||||||||||||
Scripts | Click
| ||||||||||||||||||
Credentials configuration | |||||||||||||||||||
Username | Enter the username used to connect to the remote host. If this field is left blank, PATROL Agent default account username is used for the connection. | ||||||||||||||||||
Password based authentication | |||||||||||||||||||
Password | Enter the password corresponding to the user name (enter $ character if you want to modify the password and leave it blank). | ||||||||||||||||||
Key based authentication | |||||||||||||||||||
Public key file path | Enter the absolute path of the file that will hold the public key. | ||||||||||||||||||
Private key file path | Enter the absolute path of the file that will hold the private key. | ||||||||||||||||||
Passphrase | Enter the passphrase to access public and private keys (enter $ character if you want to modify the password and leave it blank). | ||||||||||||||||||
OK | Click to save the configuration. | ||||||||||||||||||
Cancel | Click to close the configuration window. |
Configure scripts and devices from a file.
Field | Description |
---|---|
Import devices from files | Enable this option to configure devices and scripts from file. The files must be located in $PATROL_HOME/TRO/Conf/ImportDevices directory. PATROL Agent will read the files and configure the devices and scripts within each file. An instance name is created for the configured files. The instance name is similar to the file name. All devices and scripts in a file are grouped under the same instance. A read me file with instructions on how to configure from file is located at $PATROL_HOME/TRO/Conf/ImportDevices directory. Template for configuring from file: # Device Name/IP,Forced IP Address,Port,Connection timeout,Connection poll interval,Username,Password,Public Key Path,Private Key Path,Passphrase|Script name*Script path*Script arguments*Script timeout*Script poll Interval*Script RegEx to search| Example 1: To configure a device with three scripts that execute RegEx 'ERR'. User name and password details are available. clm-aus013799,172.22.177.167,22,2000,60,yossi,yossi123,,,|scriptInstaneName1*/root/yossi/apps/myAppsCPU.bash**60*300*ERR| scriptInstaneName2*/root/yossi/apps/myAppsMEM.bash**60*300*ERR|scriptInstaneName3*/root/yossi/apps/myAppsSESSION.bash**60*300*ERR| Example 2: To configure a device with three scripts that execute without a RegEx, Public, private key, and passphrase details are available. clm-aus-013799,172.22.177.167,22,2000,60,yossi,,/root/.ssh/id_rsa.pub,/root/.ssh/id_rsa,yossi123|scriptInstaneName1*/root/yossi/apps/ myAppsCPU.bash**60*300*|scriptInstaneName2*/root/yossi/apps/myAppsMEM.bash**60*300*|scriptInstaneName3*/root/yossi/apps/ myAppsSESSION.bash**60*300*| |
The KM uses default configuration if you do not configure Devices, port, timeout, polling interval, and credentials in the Device configuration section.
The KM uses the default configuration if Timeout and poll interval are not provided in any script configuration. Field Description Default device configuration Port Enter the SSH port number to connect to the configured device. The default port number is 22. Timeout (sec) Enter the connection timeout period in seconds. A targeted device might not be available or might be very slow to respond. In such scenarios, ensure that the KM will not wait for it and just stop responding. This value is used in such scenarios. You can define the maximum time to allow for an SSH connection establishment. If the time elapses, the KM understands that there is a failure in ability to monitor using the script. If the network or targeted host is slow, you can still get the KM to work properly by allowing a longer timeout period. The minimum value is 1 second and the maximum value is 600 seconds. Default value is 5 seconds. Poll interval (sec) The PATROL Agent maintains it’s set of SSH connections to all targeted hosts. If a connection breaks then the PATROL Agent can reconnect smoothly. Checking the status of the SSH connection is done at a polling interval defined by this field. By default, the KM checks the connection status every 300 seconds. The minimum value is 10 seconds and the maximum value is 3600 seconds. Credentials configuration Username Enter the username to connect to the remote device. Password based authentication Password Enter the password corresponding to the user name (enter $ character if you want to modify the password and leave it blank). Key based authentication Public key file path Enter the absolute path of the file that will hold the public key. Private key file path Enter the absolute path of the file that will hold the private key. Passphrase Enter the passphrase to access public and private keys (enter $ character if you want to modify the password and leave it blank). Default script configuration Timeout (sec) Enter the script timeout in seconds. The default value is 30 seconds. Poll interval (sec) Enter the period in seconds between two consecutive script execution intervals. By default, the script runs every 300 seconds. The minimum value is 10 seconds and the maximum value is 3600 seconds.
Configure the administration section to use the KM more efficiently.
Field | Description |
---|---|
Root display name | Enter the root display name. This is the main container that will hold all the scripts. The name must not contain < > \ / | " : * ? characters. |
Device mapping | Select the device mapping mode:
|
JAVA_HOME path | Enter the complete path of the JAVA_HOME directory if you are not using the JRE that is installed with the PATROL Agent. JAVA home environment variable or PATROL Agent JRE will be used if this field is left empty. Note: Java Runtime Environment (JRE) 1.8 or later is supported (for LINUX-UNIX shell script monitor type configuration, that is, support for remote script execution only). Example:
|
Custom monitor types cleanup | Allows you to choose to delete the old monitor types (known as knowledge modules) that were created based on the scripts output and are no longer in use.
|
Enable logging | Select/clear check box to enable/disable logging. The log files are located at $PATROL_HOME/TRO/logs, on the server where the PATROL Agent is running. By default, the debug is disabled (check box cleared). |
OK | Click to save the configuration. |
Cancel | Click to close the configuration window. |