UDP Client Adapter

The UDP Client Adapter connects to a UDP Server to receive a data stream. The adapter passes the data stream to a parser. The parser parses the data stream into data tokens, which the mapping function converts into events.

The following table describes the UDP Client Adapter parameters:

UDP Client Adapter configuration parameters

ParameterDescription
instanceName

Name of the adapter instance The instance name is the first entry in the adapter configuration and must be enclosed in square brackets. 

Required

Note

To run more than one instance of the adapter, specify a unique name and configuration for each adapter instance.

ConnectTimeoutMaximum time a connection will stay active 

After the period of time specified in ConnectTimeout has expired, the adapter closes the connection. No more data will be received from that connection. 

If no ConnectTimeout value is specified or if the value specified is 0, the timer is disabled. This is the default behavior.
EngineType of adapter in use 

Required 

Valid value: MA::Adapter::UdpClient
IdleTimeoutMaximum time, in seconds, after which new data is expected to have arrived. 

After this time, the connection is considered unsuccessful. 

Default: 15 The UDP Client Adapter sends packets at regular intervals specified by the sum of the periods specified by theIdleTimeout and RestartInterval parameters.
LocalHost

Local IP address on a computer with multiple network interfaces to which the UDP Client Adapter binds 

Specify a value for this parameter only when the adapter is on a computer that has multiple network interfaces. By default, the adapter will bind to the default interface. 

Valid values: host name or IP address

Do not specify localhost127.0.0.1, or INADDR_ANY as a value for this parameter.

LocalPortLocal port number to which the UDP Client Adapter binds Default: ANY
MapfileName of the MAP file used to generate events from the tokenized data 

Required
Parser

Parser instance that must be used to parse and tokenize the client input stream 

Required

Example

Parser = ParseSyslog, whereParseSyslog is the unique name for a parser definition, such as the following: 
[ParseSyslog] 
Engine = MA::Parser::FixedWidth 
In the adapter definition, do not code as follows:Parser = MA::Parser::FixedWidth

RemoteHostHost name or IP address of the remote computer to which the UDP Client Adapter is connecting
RemotePortPort on the remote computer to which the UDP Client Adapter is connecting
RestartInterval

Interval, in seconds, at which:

  • The UDP Client Adapter reattempts to bind to the local port if that port is busy when the adapter makes its first bind attempt.
  • The UDP Client Adapter sends a packet at the rate prescribed by this parameter plus the interval prescribed in the IdleTimeout parameter, if the connection that the adapter uses is functioning.

Default: 60 
The RestartInterval parameter value is also used to schedule additional connection attempts by the adapter when any of the following events occur:

  • The current connection fails.
  • The remote server hangs.
  • The amount of time specified in the IdleTimeoutparameter expires.
SendOnConnectString that is sent after a connection is established

The following figure shows a sample UDP Client Adapter configuration, as it would appear in the mcxa.conf file. 


Sample UDP client Adapter configuration

[MyUDPClient]
Engine = MA::Adapter::UdpClient
MapFile = mcudpclt.map
RemoteHost = test.bmc.com
RemotePort = 13
Parser = SeparatorParser

Diagnostics

All adapter errors are logged as events. Optionally, you can enable tracing by setting the tracing parameters in the global section of the mcxa.conf file. For more information, see Enabling tracing .

The UDP Client Adapter can generate an ERR_UDP_INIT error, which indicates that an error occurred when receiving data from the server. For more information, see the event that is created for this error.

Was this page helpful? Yes No Submitting... Thank you

Comments