Configuring network devices, DNS servers, and ports using file-based configuration

This topic provides an overview on how you can configure network devices, DNS servers, and ports from files by using file-based configuration. The KM provides the ability to configure devices from files. You can create your own files to define all the devices you want to ping or monitor. The PATROL Agent will read the configuration settings from these files and configure the KM to monitor the devices within each file. You can configure multiple files, and these files will be consolidated into a group. 

Configuring DNS servers

You can configure DNS servers using file-based configuration. The device configuration details must be saved in a text file and located at %PATROL_HOME%\KDN\Conf\ImportDevices\ directory. In TrueSight, you can enable file-based configuration by enabling the Import devices from files option. In PCM,  you can enable file-based configuration by replacing 0 value by 1 for the /KDN_Root/ReadFromFile configuration variable.

You can find the instruction on how to prepare your file based configuration in the %PATROL_HOME%\PPM\Conf\ImportDevices\FileBaseConfiguration_ Instructions.txt file, which is as follows:

###############################################################################
## Instructions: 
## Create file base configuration to monitor DNS servers
###############################################################################
# 
# Create your own files base configuration to define the DNS servers and DNS queries you would like to monitor. 
# Patrol agent will read from those files and configure to monitor all of DNS queries 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 DNS servers and DNS queries within this file will be grouped under this instance. 
# 
# 
# Patrol agent will add new DNS servers and DNS queries automatically from new files. 
# Patrol agent will remove DNS servers and DNS queries automatically from files that were removed. 
# Patrol agent will add/delete/modify DNS servers and DNS queries automatically from files that were modified. 
# 
# All files should be located within %PATROL_HOME%/KDN/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 DNS servers/DNS queries configuration settings.
# 
# 
##################### 
### File content: ### 
##################### 
#
#
# Device Name/IP,Forced IP Address,Port,Connection Protocol,Connection timeout,Connection poll interval|Query name*Query*Query type*Query timeout*Query	poll interval*RegEx|
#
# 
# Device name/IP                 =	Real DNS 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 DNS device IP address if the DNS device name configured with the alias name.
# Port number                    =	The DNS port number.
# Connection Protocol            =  0(TCP) or 1(UDP).
# Connection timeout             =	Timeout in seconds.
# Connection poll interval       =	Connection poll interval time in seconds.

# Query name	      	         =	The DNS query instance name.
# Query	                         =	The DNS query.
# Query	type                     =	The DNS type,choose the query index from the list below
# Query	timeout                  =	Query timeout in seconds.
# Query	poll interval            =	Query poll interval time in seconds.
# RegEx                          =	A Java regular expression to search on the query output.
 
#####################
### Query types list
#####################
# 1   =   "A - Address Mapping record"
# 2   =   "NS - Name Server records"
# 28  =	  "AAAA - IPv6 Address Mapping record"
# 5   =   "CNAME - Canonical Name record"
# 6   =   "SOA - Start of Authority"
# 12  =   "PTR - Reverse-lookup Pointer records"
# 15  =   "MX - Mail exchanger record"
# 33  =   "SRV - Service Location"
# 16  =   "TXT - Text record"
# 37  =   "CERT - Certificate record"
# 255 =   "ANY - All records"

############################################################################################################################### 
# 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.
# All configuration settings, contains two queries with XXX and YYY regex
# MyDNSServer,137.72.16.1,53,1,10,30|ANYquery*xxx.com*255*10*30*XXX|ANYqueryNEW*yyy.com*255*10*30*YYY
            	 
# Example 2. 
# DNS port number, is TCP, timeout, poll interval configuration settings will be taken from the default configuration.
# MyDNSServer,137.72.16.1,,,,|ANYquery*xxx.com*255*10*30*XXX

Configuring Ports


You can configure Ports using file-based configuration. The device configuration details must be saved in a text file and located at %PATROL_HOME%\PIM\Conf\ImportDevices\ directory. In TrueSight, you can enable file-based configuration by enabling the Import devices from files option. In PCM,  you can enable file-based configuration by replacing 0 value by 1 for the /PIM_Root/ReadFromFile configuration variable.

You can find the instruction on how to prepare your file based configuration in the %PATROL_HOME%\PIM\Conf\ImportDevices\FileBaseConfiguration_ Instructions.txt file, which is as follows:

###############################################################################
## Instructions:
## Create file base configuration to monitor ports
###############################################################################
#
# Create your own files base configuration to define all of the ports you would like to monitor.
# Patrol agent will read from those files and configure to monitor all of ports 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 ports within this file will be grouped under this instance.
#
#
# Patrol agent will add new devices and ports automatically from new files.
# Patrol agent will remove devices and ports automatically from files that were removed.
# Patrol agent will add/delete/modify devices and ports automatically from files that were modified.
#
# All files should be located within %PATROL_HOME%/PIM/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 '*' and ';' are allowed only to separate between settings in the device/ports configuration settings.
#
#
#########################
### 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,Connection timeout,Connection poll interval,Known ports,Known ports path|Port name*Port number*Port timeout*Port poll Interval*Use SSH default credentials*Username*password*publicKey*privateKey*passphrase*Operation Name*Write*Read*RegEx|
#
#
# 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
# Connection timeout             =  Timeout in seconds
# Connection poll interval       =  Connection poll interval time in seconds
# Known ports                    =  1 (Enable) or 0(disable) known ports monitoring. Once enable the default file named KnownPorts.txt will be loaded.
# Known ports path               =  Create your own known ports file and locate it within %PATROL_HOME%/PIM/Conf/Port/KnownPorts/ folder. Once enable the user define know ports file will be loaded.
# Port name                      =  The instance name for the configured port to monitor
# Port number                   =  The port number
#
# Port timeout                   =  Timeout in seconds
# Port poll Interval     =  Port poll interval time in seconds
# Use SSH default credentials        =  1 (True) or 0(false)
# SSH login credential, relevant only for SSH port monitoring, in case you would like to simulate a login scenario as well.
#
# 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)
#Content match
# Operation Name         =  the name of the operation that include Write, Read and Regex
#                  For multiple operations, use semicolon, operation will be executed according to the order they entered.
# Write                          =  Commands to write.
# Read                           =  Read any incoming data from the monitored port.
#                  Read options can be set accordingly
#                    a-  Leave empty - the incoming text will be ignored
#                    b-  String - reading from the port for incoming text will be done until a certain string is received or the port closes.
#                    c-  Read all  - enter .<BMC_STAR> to read all the incoming text
#
#
# RegEx                          =  A Java regular expression to search on the relative command output.
#                  For multiple regexes, use <BMC_REG>
#
# Note:
# -----
# Part of the characters are used as a separator, use the following replacement labels:
  ',' replace with <BMC_COMMA>
  '|' replace with <BMC_PIPE>
  '*' replace with <BMC_STAR>
  ';' replace with <BMC_SEMICOLON>
###############################################################################################################################
# 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 one port to monitor without any other configuration settings
# clm-aus-015328,,60,60,,|Patrolagent*3181*60*60
# Example 2.
# Configure device with one port to monitor with all of the configuration settings
# clm-aus-013799,172.22.177.167,300,60,1,WindowPorts.txt|portInstaneName1*80*60*300*
# Example 3.
# Configure device with one SSH port with user password
# clm-aus-013799,172.22.177.167,300,60,0,|SSHPortName1*22*60*300*0*username*password
# Example 4.
# Configure device with SSH default credentials
# clm-aus-013799,172.22.177.167,300,60,0,|SSHPortName1*22*60*300*1
# Example 5.
# Configure device with one SSH port with(Public Key Path, Private Key Path and Passphrase)credentials
# clm-aus-013799,172.22.177.167,300,60,0,|SSHPortName1*22*60*300*0*username**publicKey*privateKey*passphrase
# Example 6.
# Configure device with one port to monitor with content match settings (Write, Read and Regex)
# clm-aus-013799,172.22.177.167,300,60,0,|portInstaneName1*80*60*300*0*user*password****operationName1,cat /home/sample.txt,Error,err1;operationName2,cat /home/sample2.txt,.<BMC_STAR>,err2
# Example 7.
# Configure device with 3 ports to monitor without write and read and regex
# clm-aus-015328,172.22.178.167,300,60,,|portInstaneName1*162*60*300|portInstaneName2*161*60*300|portInstaneName3*25*60*300|
# Example 8.
# Configure device with default configuration (Connection timeout, Connection poll interval) and port with default configuration (Port timeout*Port poll Interval)
# clm-aus-013796,172.22.177.167,,,1,WindowPorts.txt,,|portInstaneName1*22|portInstaneName2*161
# Example 9.
# Configure device with default configuration (Connection timeout, Connection poll interval) and one SSH port with default configuration (Port timeout*Port poll Interval,Username,Password)
# and one regular port with default configuration(Port timeout*Port poll Interval)
#clm-aus-013795,172.23.177.167,,,1,WindowPorts.txt,,|portInstaneName1*22***1|portInstaneName2*161



Configuring network devices to be pinged

You can configure network devices or network segment to be pinged using file-based configuration. The device to be pinged automatically place the files at %PATROL_HOME%\PPM\Conf\ImportDevices\ directory. 

If you do not provide values for the following configuration fields in the text file, it will take its respective default values:

  • Protocol
  • Dynamic IP
  • Poll interval (sec)
  • Transmit packet size (bytes)
  • Retries count
  • Timeout (ms)

Note

  • If two files that contain the same host name, then a warning message will be displayed in the Monitor Status parameter. For more information see, Triggering an event in the Operations Console.
  • There is no option to configure a device twice.
  • Device name is not case sensitive

You can find the instruction on how to prepare your file based configuration in the %PATROL_HOME%\PPM\Conf\ImportDevice\FileBaseConfiguration_ Instruction.txt file, which is as follows:

#
#
########################################################
## Instructions:
## Create file base configuration to ping multi devices. 
########################################################
#
# Create your own files base configuration to define all devices you would like to ping.
# Patrol agent will read from those files and configure to monitor all of the devices within each file.
# File name should be meaningful, for each configured file, instance will be created, the name of the instance will be the file name. 
# All of the devices within this file will be grouped under this instance.
#
#
# Patrol agent will add new devices automatically from new files.
# Patrol agent will remove devices automatically from files that were removed.
# Patrol agent will add/delete/modify devices automatically from files that were modify.
#
# All files should be located within %PATROL_HOME%/PPM/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 
#
###############
# File content:
###############
#
# DeviceName/IP*Forced IP Address, Protocol, IsDynamic, PollInterval, Timeout, TransmitPackageSize, RequestCount
#
# DeviceName/IP*Forced IP Address =	Device name/IP*Forced IP Address(Forced IP Address is optional, if empty then the Device name/IP should be a real host name or IPAddress) 
# Protocol =				Protocol 1(IPV4), 2(IPV6)
# IsDynamic =				Whether static or dynamic IP addresses 1(Yes), or 2(No)
# PollInterval =			Poll interval time in seconds to ping the device - 10(Min), 3600(Max)
# Timeout =				Timeout in milliseconds to wait for each reply
# TransmitPackageSize =			Bytes to send - 32(Min), 65500(Max)
# RequestCount =			Number of echo requests to send 1 (Min), 10 (Max)
#
#
##################################################################################
# In case of missing configuration details default values will be set accordantly:
##################################################################################
#
# Protocol =             Protocol 1(IPV4)
# IsDynamic =            2(No)
# PollInterval =         300 seconds
# Timeout =              1000 milliseconds
# TransmitPackageSize =  32 bytes
# RequestCount =         4
#
#
##############
### Examples:
##############
#
# myAliasNameServerA*10.128.64.120,1,2,300,1000,32,4
# myAliasNameRealServerB,1,1,300,1000,32,4
# myAliasNameRealServerC
# myAliasNameServerD*10.128.64.120
# myAliasNameRealServerE,,1
#
#
#############
### Warning: 
#############
#Empty line is not allowed, please use '#' as a comment.

Configuring network devices for monitoring

You can configure network devices or network segment using file-based configuration. The device configuration details must be saved in a text file and located at %PATROL_HOME%\PSM\Conf\ImportDevices\ directory. In CMA, you can enable file-based configuration by enabling the Import devices from files option. In PCM,  you can enable file-based configuration by replacing 0 value for the configuration variable, /PSM/PSM_Root/ReadFromFile.

You can find the instruction on how to prepare your file based configuration in the %PATROL_HOME%\PSM\Conf\ImportDevice\FileBaseConfiguration_ Instruction.txt file, which is as follows:

###################################################################
## Instructions:
## Create file base configuration to monitor multi network devices. 
###################################################################
#
# Create your own files base configuration to define all devices you would like to monitor.
# Patrol agent will read from those files and configure to monitor all of the devices 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 within this file will be grouped under this instance.
#
#
# Patrol agent will add new devices automatically from new files.
# Patrol agent will remove devices automatically from files that were removed.
# Patrol agent will add/delete/modify devices automatically from files that were modified.
#
# All files should be located within %PATROL_HOME%/PSM/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 character '/' and '|' are not allowed, device that will be configured with those characters will be ignored. 
#			3. The character ',' is allowed only to separate between settings in the device configuration details.
#
#
#########################
### Security warning:####
#########################
#			
#			File based configuration might contains security settings details such as: community string, V3 user password and privacy password.
#			Security settings details are not encrypted on the file based configuration and exposed to each user with login access to this server.
#			Using the shared configuration feature, you may define the security settings details as shared configuration, and leave those field blanks in the file. 
#
#
#
#
#####################
### File content: ###
#####################
#
# Device name/IP,NativeMonitors*CustomMonitors,Forced IP Address,Port,Poll interval,Retries,Timeout,Community string,Version,Authorization protocol,Authorization user,Authorization password,Privacy protocol,Privacy password
#
# Device name/IP                 =	Real Device name/IP address or an alias name, if you provide alias name then Forced IP address must be provided
#
# NativeMonitors*CustomMonitors  =	Native and custom monitors are separated by the star '*' character (native monitors provided by BMC and custom monitors defined by the end user).
#					For multiple native or/and custom monitors use the semicolon ';' character.
#
#					Select from the list the native monitors you want to configure on the particular network device: 
#					SNMPAgentAvailability;InterfaceMIB;CiscoLocalInterfaces;CiscoRouter;F5BigIP;HostMIB;RMON;TCP
#
#					In case you want to configure few custom monitors (CustomMonitor_1;CustomMonitor_2;CustomMonitor_N), 
#					Append the star '*' character and the list of the custom monitors names to the native monitors list.
#
#					Example: 
#					To configure the native monitors: InterfaceMIB and SNMPAgentAvailability and CiscoRouter
#					And the custom monitors		: CustomMonitor_1;CustomMonitor_2;CustomMonitor_N
#
#					Enter the following:
#					InterfaceMIB;SNMPAgentAvailability;CiscoRouter*CustomMonitor_1;CustomMonitor_2;CustomMonitor_N					
#
#
# Forced IP Address               =     Provide the device IP address only if the device name configured with the alias name
# Port                            =     Port number on which the SNMP agent is running (161)
# Poll interval                   =     Poll interval time in seconds to collect data on the target device
# Retries                         =     Number of times before considering SNMP agent service is not responding 
# Timeout                         =     Timeout in seconds
# Community string                =     Community string of the SNMP agent
# Version                         =     SNMP version: 1, 2(2c), 3
#
#
# Authorization protocol          =     SHA or MD5 (only for V3)
# Authorization user              =     User name, the security name to connect with (only for V3) 
# Authorization password          =     User password (only V3)
# Privacy protocol                =     DES or AES (only V3)
# Privacy password                =     Privacy password (only V3)
#
#
#
###############################################################################################################################
# Shared 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 shared configuration details cross all of your network devices. 
###############################################################################################################################
#
#
#
##############
### Examples:
##############
#
# Example 1.
# Device to configured with SNMP V3 and with monitors InterfaceMIB and Custom monitor named PowerSupply
# myRealServerA,InterfaceMIB*PowerSupply,,161,300,2,1,public,3,SHA,yossi,yossi1234,DES,zadok
#
#
# Example 2.
# Device to configured with SNMP V2 and with monitors CiscoRouter and Custom monitor named PowerSupply
# myRealServerB,InterfaceMIB*PowerSupply,,161,300,2,1,public,2
#
#
# Example 3.
# Device to configured with shared configuration
# myRealServerC,InterfaceMIB
#
#
# Example 4.
# Device to configured with shared configuration and overwrite the community string
# myAliasServerA,InterfaceMIB,10.64.1.124,,,,,public
#
#
# Example 5
# Device to configured with shared configuration and overwrite the port
# myRealServerF,InterfaceMIB,,161
#
#
Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Anthony Rogalski

    What is the maximum number of DNS Names/IP Addresses allowed in a Ping configuration file?

    Jul 24, 2019 08:46
  2. Thurlow Caffey

    What is the maximum number of ips that can be associated with a device in a line in a ping config file? Is it ultimately operating system line length constrained? What if you have more ips than the OS line length limit allows; how would one cope with that? '' char at end of a line for Linux/Unix? What about MS-Win?

    Jan 29, 2020 04:57
    1. Swati Malhotra

      Hi Thurlow Caffey , Anthony Rogalski


      If you have more IPs than the OS line length limit, use the new line identifiers - \n or \r. For more information, please contact BMC Support.

      Thanks and regards,

      Swati

      Mar 15, 2020 11:07
  3. Thurlow Caffey

    Could you add some examples showing ping config file entries for hosts that have multiple ip's as I don't see any above. Thanks!

    Nov 03, 2020 07:10
    1. Swati Malhotra

      Hi Thurlow Caffey,

      You will find examples in this file - %PATROL_HOME%\PPM\Conf\ImportDevices\FileBaseConfiguration_Instructionsfile.

      Hope this helps,

      Thanks and regards,

      Swati

      Nov 04, 2020 01:01
  4. Thurlow Caffey

    Can I use symlinks, in Linux, to point to ping config files located elsewhere on the system? i.e. Will LWPv3 KM tolerate it well? Example: [root@myHostName 3181]# pwd /opt/patrol/Patrol3/PPM/Conf/ImportDevices/3181

    ls -l

    lrwxrwxrwx. 1 root root 39 Nov 3 16:37 aPingConfigFile.txt -> /opt/someWhereElse/aPingConfigFile.txt

    Please advise; thanks.

    Nov 03, 2020 07:24
    1. Swati Malhotra

      Hi Thurlow Caffey ,


      We will get back to you on this.


      Thanks and regards,

      Swati

      Nov 04, 2020 01:18
    1. Swati Malhotra

      Hi Thurlow Caffey,


      Yes, the symlinks can be used to point to ping configuration files located elsewhere on the system while configuring the policy.

      Hope this helps! For more information, contact BMC Support.


      Thanks and regards,

      Swati

      Nov 09, 2020 03:32