Configuring Ports using PCM
This section describes how to configure ports and check the port availability and response time using PATROL Configuration Manager (PCM).
List of ruleset files
The following table lists the rule set files, which are available at $PATROL_HOME\..\pconfmgr\rulesets\Shipped\PIM\km_version_number\Port for configuring network devices:
Files | Descrption |
|---|---|
ConfigurationFilesBasedMonitoring.cfg | Contains configuration variables to configure network devices from a text file. the text file is located at%PATROL_HOME%\PIM\Conf\ImportDevices. |
DefaultConfiguration.cfg | Default configuration settings enables you to set pre-defined values for the configuration fields to ping a network device or network segment. You can set up default configuration. |
Port.cfg | Contains configuration variables to provide additional information related to ports. |
Administration.cfg | Contains configuration variables to provide additional information related to network devices, such as, display name, debug enabling and so on. |
All.cfg | Consolidated file containing all the configuration variables available in Administration.cfg, ConfigurationFilesBasedMonitoring.cfg, Port.cfg, and DefaultConfiguration.cfg. |
All.cfg file template
The following is the template of All.cfg file, which contains configuration variables to monitor ports.
"/PIM/txn_id" = { REPLACE = "1"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/DeviceName" = { REPLACE = "<<MyDevice>>"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/ipAddress" = { REPLACE = "<<ip>>"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/Category" = { REPLACE = "<<Network>>"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/DevicePollInterval" = { REPLACE = "<<300>>"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/DeviceTimeout" = { REPLACE = "<<10>>"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/ScanPorts" = { REPLACE = "<<0>> },
"/PIM/PIM_Root/Devices/<<MyDevice>>/ScanFilePath" = { REPLACE = "<<myScanFilePath>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PortName" = { REPLACE = "<<MyPort1>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/Port" = { REPLACE = "<<Port>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PortPollInterval" = { REPLACE = "300" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PortTimeout" = { REPLACE = "10" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/UseDefaultCredentialsSSH" = { REPLACE = "<<1(Yes) or 0(No)>>"}
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/UserName" = { REPLACE = "<<Username>>"},
"/SecureStore/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/Password" = { REPLACE = "PIM_Port;PIM_Root/<<Password>>"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PublicKeyFilePath" = { REPLACE = "<<PublicKeyFilePath>>"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PrivateKeyFilePath" = { REPLACE = "<<PrivateKeyFilePath>>"},
"/SecureStore/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PassPhrase" = { REPLACE = "PIM_Port;PIM_Root/<<PassPhrase>>"},
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_1>>/OperationName" = { REPLACE = "<<Operation name>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_1>>/Write" = { REPLACE = "<<My commands to write>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_1>>/Read" = { REPLACE = "<<Read commands output>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_1>>/RegEx" = { REPLACE = "<<Java regular expression>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_2>>/OperationName" = { REPLACE = "<<Operation name>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_2>>/Write" = { REPLACE = "<<My commands to write>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_2>>/Read" = { REPLACE = "<<Read commands output>>" },
"/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_2>>/RegEx" = { REPLACE = "<<Java regular expression>>" },
"/PIM/PIM_Root/Shared_DevicePollInterval" = { REPLACE = "<<300>>"},
"/PIM/PIM_Root/Shared_DeviceTimeout" = { REPLACE = "<<10>>"},
"/PIM/PIM_Root/Shared_UserName" = { REPLACE = "<<Username>>"},
"/SecureStore/PIM/PIM_Root/Shared_Password" = { REPLACE = "PIM_Root/<<password>>"},
"/PIM/PIM_Root/Shared_PublicKeyFilePath" = { REPLACE = "<<Default_PublicKeyFilePath>"},
"/PIM/PIM_Root/Shared_PrivateKeyFilePath" = { REPLACE = "<<Default_PrivateKeyFilePath>>"},
"/SecureStore/PIM/PIM_Root/Shared_PassPhrase" = { REPLACE = "PIM_Root/<<Default_PassPhrase>>"},
"/PIM/PIM_Root/Shared_PorttPollInterval" = { REPLACE = "<<300>>"},
"/PIM/PIM_Root/Shared_PortTimeout" = { REPLACE = "<<10>>"}
"/PIM/PIM_Root/RootDisplayName" = { REPLACE = "<<Port>>"},
"/PIM/PIM_Root/DeviceMapping" = { REPLACE = "<<0(No) or 1(Yes: FQDN) or 2(Yes: User defined)>>"},
"/PIM/PIM_Root/ReadFromFile" = { REPLACE = "<<0>>"},
"/PIM/PIM_Root/JAVA_HOME" = { REPLACE = "<<%JAVA_HOME%>>"},
"/PIM/PIM_Root/Debug" = { REPLACE = "<<1(Yes) or 0(No)>>"}
Configuring ports using PCM menu commands
The following procedure explains how to use the PATROL Configuration Manager menu commands to create and configure custom monitor.
- In PATROL Configuration Manager, locate Shipped > PIM > KM_version_number > PortsConfiguration folder.
- Select the ruleset folder using which you want to configure the network devices.
- Right-click the rule and select Edit Rule. The RuleSet dialog box is displayed.
- In the Operation column, select the REPLACE option, which is the default value.
Double-click the highlighted space in the Value column and enter the value of the variable.
For information about the description and values of the variables, see Configuration variables.- Click OK.
- Repeat the above steps for all the rules.
- After adding values to the variables for creating custom monitor, drag the new RuleSet onto the agentHostName in the left pane.
- Click the Apply Configuration icon in the PATROL Configuration Manager menu bar.
Configuring using the PATROL Configuration Manager CLI
- The PATROL Configuration Manager CLI processes a script file that contains commands regarding RuleSets.
- To perform BMC PATROL for Light Weight Protocols configuration using the PATROL Configuration Manager RuleSets, you must set values for the configuration variables in the .cfg files. After you provide values in the files, you can apply the configuration to the PATROL Agent using the PATROL Configuration Manager CLI. For a list of configuration variables that you can include in the .cfg file, see Configuration variables.
- Store your .cfg files in any directory under the %BMC_ROOT%/pconfmgr/rulesets directory, and use the following command to apply the RuleSets:
- (Windows) pcm.cmd -f scriptFileName
(UNIX) pcm.sh -f scriptFileName
The scriptFileName variable represents the script file that contains commands to be executed for applying RuleSets. For example, to apply RuleSets for the creating and configure custom monitor, enter the apply -a agentName Port
command in the script file. The Port variable represents the name of the RuleSets file.
For more information about the commands and options that can be used in a script file, see the Configuration variables.
Configuration variables
The following table provides information about the configuration variables for configuring the network devices you want monitor. You can use PATROL Configuration Manager to add values to the variable for configuring network devices. For more information about how to add values to the network device, see Configure-using-PATROL-Configuration-Manager.
Variable | Description | Operation | Value |
|---|---|---|---|
/PIM/txn_id | Activates the network device configuration. Note: Every time you configure a network device or network segment, the value of txn_id must be different from the previous configuration of network device or network segment. | Replace | 1 |
Device configuration details | |||
/PIM/PIM_Root/Devices/<<MyDevice>>/DeviceName
| Device alias name or a real hostname or IP Address | Replace | MyDevice |
/PIM/PIM_Root/Devices/<<MyDevice>>/ipAddress | Device IP address, in case the configured DeviceName is an alias name | Replace | ipAddress |
/PIM/PIM_Root/Devices/<<MyDevice>>/Category | Category name | Replace | Network |
/PIM/PIM_Root/Devices/<<MyDevice>>/DevicePollInterval | Device validation frequency in seconds | Replace | 300 |
/PIM/PIM_Root/Devices/<<MyDevice>>/DeviceTimeout | Time in seconds for device resolution | Manual | 10 |
/PIM/PIM_Root/Devices/<<MyDevice>>/ScanPorts
| Enable this option to load known ports from a file. | Manual |
|
/PIM/PIM_Root/Devices/<<MyDevice>>/ScanFilePath
| The location of the known ports file. Default file named KnownPorts.txt will be used by leaving this field empty. | Replace | myScanFilePath |
Port configuration | |||
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PortName | Port display name, can be any meaningful name associated with the port. | Replace | MyPort1 |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/Port | The port number. | Replace | Port |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PortPollInterval | Port collection frequency in seconds | Replace | 300 |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PortTimeout | Port timeout in seconds | Replace | 10 |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/UseDefaultCredentialsSSH | Enable this option to apply settings from the default configuration. | Replace |
|
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/UserName | User name to connect to remote host using SSH protocol | Replace | Username |
/SecureStore/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/Password | Password for password based authentication connection | Replace | PIM_Port;PIM_Root/<<Password>> |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PublicKeyFilePath | Full path to the file that will hold the public key ,in key based authentication connection | Replace | PublicKeyFilePath |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PrivateKeyFilePath | Full path to the file that will hold the private key ,in key based authentication connection | Replace | PrivateKeyFilePath |
/SecureStore/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/PassPhrase | Pass-phrase to access public and private keys | Replace | PIM_Port;PIM_Root/<<PassPhrase>> |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_1>>/OperationName | The operation_index is the order that commands will be executed, the first operation name and its Write, Read and Regex will be executed first. | Replace | Operation name |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_1>>/Write | Text to write on the socket. Example: getting the web page use the text 'GET /\r\n\r\n' | Replace | My commands to write |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_1>>/Read | Read any incoming data from the monitored port. Read options can be set accordingly:
| Replace | Read commands output |
/PIM/PIM_Root/Devices/<<MyDevice>>/Ports/<<MyPort1>>/ContentMatchList/<<operation_index_1>>/RegEx | A Java regular expression or a string to search within the return text. Use semicolon character to separate between multiple regular expressions or a strings. | Replace | Java regular expression |
Files based configuration | |||
/PIM_Root/ReadFromFile | Replace |
| |
Default configuration | |||
/PIM/PIM_Root/Shared_PollInterval | Connection validation frequency in seconds | Replace | 300 |
/PIM/PIM_Root/Shared_DeviceTimeout | Connection timeout in seconds | Replace | 10 |
/PIM/PIM_Root/Shared_UserName | SSH username to connect to the remote host | Replace | Username |
/SecureStore/PIM/PIM_Root/Shared_Password | Password for password based authentication connection | Replace | PIM_Root/<<password |
/PIM/PIM_Root/Shared_PublicKeyFilePath | Full path to the file that will hold the public key ,in key based authentication connection | Replace | Default_PublicKeyFilePath |
/PIM/PIM_Root/Shared_PrivateKeyFilePath | Full path to the file that will hold the private key ,in key based authentication connection | Replace | Default_PrivateKeyFilePath |
/SecureStore/PIM/PIM_Root/Shared_PassPhrase | Pass-phrase to access public and private keys | Replace | PIM_Root/<<Default_PassPhrase |
/PIM/PIM_Root/Shared_PortPollInterval | Port collection frequency in seconds | Replace | 300 |
/PIM/PIM_Root/Shared_PortTimeout | Port timeout in seconds | Replace | 10 |
Administration configuration | |||
/PIM/PIM_Root/RootDisplayName | Display name for the monitor type in order to display a meaningful location name for the target agent. | Manual | Port |
/PIM/PIM_Root/DeviceMapping | Option to display monitor instance as a device in the Operations console. | Replace |
|
/PIM/PIM_Root/Debug | Option to enable logging. The log files are created at %PATROL_HOME%\PIM\logs. By default, this option is disabled. | Replace |
|
/PIM/PIM_Root/Java path | Specify the path of the JRE directory ($JAVA_HOME environment variable) on the PATROL Agent host which is used by the KM. If the JAVA_HOME environment variable of the PATROL Agent is set, you can use the default value $JAVA_HOME as the Java path. If the feild is left blank, the KM uses the Java path installed on the PATROL Agent home directory in the following format: $PATROL_HOME/openjdk or $PATROL_HOME/jre64. For example: Windows - C:\Program Files\Java\jdk-11. | Replace | %JAVA_HOME% |