Information

This site will undergo a brief period of maintenance on Friday, 18 December at 12:30 AM Central/12:00 PM IST. During a 30 minute window, site availability may be intermittent.

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.

PATROL_CONFIG
"/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.

  1. In PATROL Configuration Manager, locate Shipped > PIM > KM_version_number > PortsConfiguration folder.
  2. Select the ruleset folder using which you want to configure the network devices.
  3. Right-click the rule and select Edit Rule. The RuleSet dialog box is displayed.
  4. In the Operation column, select the REPLACE option, which is the default value.
  5. 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.

    Warning

    Note

     The value of the variable does not support blank spaces and special characters such as /, \, &, and @.

  6. Click OK.
  7. Repeat the above steps for all the rules.
  8. After adding values to the variables for creating custom monitor, drag the new RuleSet onto the agentHostName in the left pane.
  9. 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.

      Warning

      Note

      In the apply -a agentName Port command:

      • Specify the path as relative to the RuleSets directory.
      • Do not include the extension when specifying the file name.

 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.

 

Warning

Note

The value, Manual in the value column of the table indicates that there is no predefined value for the configuration variable and you must manually enter a value for those variables.

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

  • 1 - Yes
  • 0 - No

/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

  • 1 - Yes
  • 0 - No

/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:

  • Leave empty - the incoming text will be ignored
  • String - reading from the port for incoming text will be done until a certain string is received or the port closes.
  • Read all  - enter .* to read all the incoming text

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

  • 1 - Yes
  • 0 - No

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

  • 0 - Disable
  • 1 - Displays FQDN as the device name of the network device in the Operations console
  • 2 - Displays user defined name (alias name) as the device name of the network device in the Operations console.

/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

  • 0 - Disable logging
  • 1 - Enable logging

/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%


 

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

BMC PATROL for Light Weight Protocols 3.0