DiscoTelnetHelperSchema.cfg configuration file

The DiscoTelnetHelperSchema.cfg configuration file defines the operation of the Telnet helper, which returns the results of a Telnet operation into a specified device.

Database tables used

The DiscoTelnetHelperSchema.cfg configuration file can be used to configure inserts into the following database tables:
  • telnetHelper.configuration
  • telnetHelper.deviceConfig

You can configure the Telnet helper to use the Secure Shell (SSH) program. SSH enables authentication and provides more secure communications over the network.

Sample: configuring the Telnet helper

The following insert can be appended to the DiscoTelnetHelperSchema.cfg configuration file to configure the operation of the Telnet helper. The insert configures the Telnet helper to:
  • Use 20 threads of process execution
  • Wait a maximum of 5000 ms for a reply from a device
  • Try the request up to three times
insert into telnetHelper.configuration
(
          m_NumThreads,
          m_TimeOut,
          m_Retries
)
values
(
          20,
          5000,
          3
);

Configuring device-specific settings

The Telnet helper also accepts multiple inserts into the telnetHelper.deviceConfig table within the DiscoTelnetHelperSchema.cfg configuration file that define the interaction of the Telnet operation.

The following examples show how to configure Telnet device-specific settings. You can configure device settings based on the sysObjectID MIB variable or based on IP or subnet. The most effective way to set these options is based on the sysObjectID MIB variable. This variable identifies the device vendor. Device-specific configuration options typically vary with the device vendor. You can configure values for all Cisco devices, for example, regardless of where these devices are in the network.

Sample: configuring settings for devices from a specific vendor

The following typical configuration shows how to configure settings for all devices from a specific vendor. The insert specifies:
  • 1.3.6.1.4.1.9.1. as the sysObjectID MIB variable to match for this configuration entry. All devices with object IDs of the form 1.3.6.1.4.1.9.1.* are matched. In general, these are Cisco IOS devices, although there are exceptions.
  • terminal length is the command that sets the output page length for Cisco devices.
    Note: This command varies with devices of different vendor types.
  • No paging
  • Prompt from remote device
  • The response to send to the remote device for it to continue paged output.
insert into telnetHelper.deviceConfig
(
          m_SysObjectId,
          m_PageLengthCmd,
          m_PageLength,
          m_ContinueMsg,
          m_ContinueCmd
)
values
(
          "1.3.6.1.4.1.9.1.", "terminal length", 0, ".*[Mm]ore.*", " "
);
The DiscoTelnetHelperSchema.cfg configuration file contains inserts with default device-specific configuration settings for the following vendor types:
  • Cisco IOS devices
  • Cisco Cat OS devices
  • Juniper JUNOS devices
  • Juniper ERX devices
  • Huawei devices
  • Dasan devices

Sample: configuring device response settings based on IP address

If the output of the telnet command is longer than one page, the device sends a message asking whether to display the next page. Configure the messages to be expected and the responses to be given by the Telnet helper in the DiscoTelnetHelperSchema.cfg configuration file.

Commands beginning m_Continue (such as m_ContinueMsg) and m_PageLength (such as m_PageLengthCmd) are mutually exclusive: you must use one or the other. If these settings are not configured correctly for your devices, data might be lost.

The following example shows how to configure settings for devices based on the IP address. The insert specifies:
  • 192.168.112.0 as the IP address
  • The prompt from the remote device is a regular expression containing "wish to continue"
  • The response to send to the remote device for it to continue paged output is "y"
insert into telnetHelper.deviceConfig
(
          m_IpOrSubNet,
          m_NetMaskBits,
          m_Protocol,
          m_ContinueMsg,
          m_ContinueCmd
)
values
(
          192.168.112.0,
          24,
          1,
          ".*wish to continue.*",
          "y"
);