File based configuration
Configuring devices to execute scripts
You can configure devices using file-based configuration. The device configuration details must be saved in a text file and located at %PATROL_HOME%\TRO\Conf\ImportDevices\ directory. The KM supports text files. that is, files with .txt extension. If you do not provide values for the following configuration fields in the text file, it will take its respective default values:
- Port
- Poll interval (sec)
- Timeout (ms)
Any changes made to the file will be synchronized by the PATROL Agent.
You can find the instruction on how to prepare your file based configuration in the %PATROL_HOME%\TRO\Conf\ImportDevice\FileBaseConfiguration_ Instruction.txt file, which is as follows:
Instructions:
Create file base configuration to execute multi scripts on a multi devices.
###############################################################################
#
# Create your own files base configuration to define all of the devices you would like to execute script/s on.
# Patrol agent will read from those files and configure to monitor all of the devices and scripts within each file.
# File name should be meaningful, for each configured file, instance will be created and the name of the instance will be the file name.
# All of the devices and scripts within this file will be grouped under this instance.
#
# Patrol agent will add new devices and scripts automatically from new files.
# Patrol agent will remove devices and scripts automatically from files that were removed.
# Patrol agent will add/delete/modify devices and scripts automatically from files that were modified.
#
# All files should be located within %PATROL_HOME%/TRO/Conf/ImportDevices directory, on the same location as the instructions file (FileBaseConfiguration_Instructions.txt).
#
# Configuration files should have the .txt extension, e.g.: adprod.txt
#
#################
#
### Warnings:####
#
#################
#
#
#1. Empty line is not allowed, please use '#' as a comment.
#2. The characters ',' and '|' and '*' are allowed only to separate between settings in the device/script configuration settings.
#3. Script might configured with shell command that might include the '|' character, in this case all pipe characters need to be replaced with <BMC_SEP>
# e.g.: "my shell command | grep something" should be redefined as "my shell command <BMC_SEP> grep something"
#
#########################
#
### Security warning:####
#
#########################
#
#File based configuration might contains security settings details such as: SSH login credentials.
#Security settings details are not encrypted on the file based configuration and exposed to each user with login access to this server (known as the monitoring server).
#
#Using the default configuration feature, you may define the security settings details as default configuration, and leave those field blanks in the file.
#
#####################
#
### File content: ###
#
#####################
#
# 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|Script name*Script path*Script arguments*Script timeout*Script poll Interval*Script RegEx to search
#
#
#
# Device name/IP =Real Device name or IP address or an alias name, if you provide alias name then Forced IP address must be provided
#
# Forced IP Address =Provide the device IP address if the device name configured with the alias name
#
# Port =SSH port number (22)
#
# Connection timeout =Timeout in seconds
#
# Connection poll interval =Connection poll interval time in seconds
#
# Username =SSH username to connect to the remote device
#
# Password =SSH username password to connect to the remote device, leave it blank if you want to use Public/Private key authentication
# Public Key Path =Pull path to the file that will hold the public key (if the user password provided public Key Path will be ignored)
# Private Key Path =Pull path to the file that will hold the private key (if the user password provided private Key Path will be ignored)
# Passphrase =Passphrase to access the public and private keys (if the user password provided passphrase will be ignored)
#
#
#
#
# Script name =The instance name for the configured script to execute
# Script =Full path to the script to execute (e.g.: /root/yossi/apps/myAppsCPU.bash) or a shell command.
# Script might configured with shell command that might include the '|' character, in this case all pipe characters need to be replaced with <BMC_SEP>
# e.g.: "my shell command | grep something" should be redefined as "my shell command <BMC_SEP> grep something"
#
# Script arguments =Script arguments separated by a space character that will be passed during execution. e.g: script that measuring a log file size and should get an argument with the name of the log file.
# Script timeout =Timeout in seconds
# Script poll Interval =Script poll interval time in seconds
#
# Script RegEx to search =A Java regular expression to search on the script results.
#
###############################################################################################################################
#
# Default configuration can be defined through a policy and applied on devices that are having less configuration than required.
#
# Use this feature in case you are having default configuration details cross all of your devices.
#
###############################################################################################################################
#
Examples:
#
# Example 1.
# Configure device with 3 scripts to execute with RegEx 'ERR', user password provided
# clm-aus-013799,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.
# Configure device with 3 scripts to execute with no RegEx, public/private/passphrase provided
# 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*|
#
#
# Example 3.
# Configure 3 devices with 3 scripts with no RegEx to execute on each one of them
# clm-aus-013799,172.22.177.169,22,2000,60,yossi,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*|
# clm-aus-013798,172.22.177.168,22,2000,60,yossi,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*|
# clm-aus-013797,172.22.177.167,22,2000,60,yossi,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*|
#
#
# Example 4.
# Configure device with default configuration (Port,Connection timeout,Connection poll interval,Username,Password) (Script timeout*Script poll Interval)
# clm-aus-013799,172.22.177.167,,,,,,,,|scriptInstaneName1*/root/yossi/apps/myAppsCPU.bash|scriptInstaneName2*/root/yossi/apps/myAppsMEM.bash
Create file base configuration to execute multi scripts on a multi devices.
###############################################################################
#
# Create your own files base configuration to define all of the devices you would like to execute script/s on.
# Patrol agent will read from those files and configure to monitor all of the devices and scripts within each file.
# File name should be meaningful, for each configured file, instance will be created and the name of the instance will be the file name.
# All of the devices and scripts within this file will be grouped under this instance.
#
# Patrol agent will add new devices and scripts automatically from new files.
# Patrol agent will remove devices and scripts automatically from files that were removed.
# Patrol agent will add/delete/modify devices and scripts automatically from files that were modified.
#
# All files should be located within %PATROL_HOME%/TRO/Conf/ImportDevices directory, on the same location as the instructions file (FileBaseConfiguration_Instructions.txt).
#
# Configuration files should have the .txt extension, e.g.: adprod.txt
#
#################
#
### Warnings:####
#
#################
#
#
#1. Empty line is not allowed, please use '#' as a comment.
#2. The characters ',' and '|' and '*' are allowed only to separate between settings in the device/script configuration settings.
#3. Script might configured with shell command that might include the '|' character, in this case all pipe characters need to be replaced with <BMC_SEP>
# e.g.: "my shell command | grep something" should be redefined as "my shell command <BMC_SEP> grep something"
#
#########################
#
### Security warning:####
#
#########################
#
#File based configuration might contains security settings details such as: SSH login credentials.
#Security settings details are not encrypted on the file based configuration and exposed to each user with login access to this server (known as the monitoring server).
#
#Using the default configuration feature, you may define the security settings details as default configuration, and leave those field blanks in the file.
#
#####################
#
### File content: ###
#
#####################
#
# 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|Script name*Script path*Script arguments*Script timeout*Script poll Interval*Script RegEx to search
#
#
#
# Device name/IP =Real Device name or IP address or an alias name, if you provide alias name then Forced IP address must be provided
#
# Forced IP Address =Provide the device IP address if the device name configured with the alias name
#
# Port =SSH port number (22)
#
# Connection timeout =Timeout in seconds
#
# Connection poll interval =Connection poll interval time in seconds
#
# Username =SSH username to connect to the remote device
#
# Password =SSH username password to connect to the remote device, leave it blank if you want to use Public/Private key authentication
# Public Key Path =Pull path to the file that will hold the public key (if the user password provided public Key Path will be ignored)
# Private Key Path =Pull path to the file that will hold the private key (if the user password provided private Key Path will be ignored)
# Passphrase =Passphrase to access the public and private keys (if the user password provided passphrase will be ignored)
#
#
#
#
# Script name =The instance name for the configured script to execute
# Script =Full path to the script to execute (e.g.: /root/yossi/apps/myAppsCPU.bash) or a shell command.
# Script might configured with shell command that might include the '|' character, in this case all pipe characters need to be replaced with <BMC_SEP>
# e.g.: "my shell command | grep something" should be redefined as "my shell command <BMC_SEP> grep something"
#
# Script arguments =Script arguments separated by a space character that will be passed during execution. e.g: script that measuring a log file size and should get an argument with the name of the log file.
# Script timeout =Timeout in seconds
# Script poll Interval =Script poll interval time in seconds
#
# Script RegEx to search =A Java regular expression to search on the script results.
#
###############################################################################################################################
#
# Default configuration can be defined through a policy and applied on devices that are having less configuration than required.
#
# Use this feature in case you are having default configuration details cross all of your devices.
#
###############################################################################################################################
#
Examples:
#
# Example 1.
# Configure device with 3 scripts to execute with RegEx 'ERR', user password provided
# clm-aus-013799,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.
# Configure device with 3 scripts to execute with no RegEx, public/private/passphrase provided
# 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*|
#
#
# Example 3.
# Configure 3 devices with 3 scripts with no RegEx to execute on each one of them
# clm-aus-013799,172.22.177.169,22,2000,60,yossi,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*|
# clm-aus-013798,172.22.177.168,22,2000,60,yossi,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*|
# clm-aus-013797,172.22.177.167,22,2000,60,yossi,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*|
#
#
# Example 4.
# Configure device with default configuration (Port,Connection timeout,Connection poll interval,Username,Password) (Script timeout*Script poll Interval)
# clm-aus-013799,172.22.177.167,,,,,,,,|scriptInstaneName1*/root/yossi/apps/myAppsCPU.bash|scriptInstaneName2*/root/yossi/apps/myAppsMEM.bash
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*