Syslog Configuration

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

Syslog Configuration Settings

AcceptData:   Whether the component can accept/receive data.

When set to false the component will no longer be able to accept any data. The PacketIn event will not fire.

The default is true.

AppName:   Sets the App-Name field in RFC 5424.

This setting specifies the App-Name field of the message as defined in RFC 5424

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

MsgId:   Sets the MsgId field in RFC 5424.

This setting specifies the MsgId field as defined in RFC 5424.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ProcId:   Sets the ProcId field in RFC 5424.

This setting specifies the ProcId field as defined in RFC 5424.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedAppName:   Returns the value of the App-Name field in RFC 5424.

This setting returns the value of the App-Name field in RFC 5424.

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedMsgId:   Returns the value of the MsgId field in RFC 5424.

This setting returns the value of the MsgId field in RFC 5424.

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedProcId:   Returns the value of the ProcId field in RFC 5424.

This setting returns the value of the ProcId field in RFC 5424.

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedSDElementCount:   Returns the number of Structured-data elements in RFC 5424.

This setting returns the number of Structured-data elements in RFC 5424.

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedSDElementId:   Returns the Sd-Id value of the Sd-element with the specified SDElementIndex in RFC 5424.

This setting returns the Sd-Id value of the SD-element with the specified SDElementIndex.

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedSDElementIndex:   Returns the index of the Structured-Data element in RFC 5424.

This setting returns the index of the Structured-Data element as defined in RFC 5424.

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedSDParamCount:   Returns the number of the Sd-param values for the specified SDElementIndex in RFC 5424.

This setting returns the number of the SD-param values for the specified SDElementIndex.

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedSDParamName:   Returns the name of the SD-Param field in RFC 5424.

This setting returns the name of the SD-Param field as defined in RFC 5424. Append the index in square brackets to refer to the SD-Param field in the specified index: SDParamName[index]

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

ReceivedSDParamValue:   Returns the value of the SD-Param field in RFC 5424.

This setting returns the value of the SD-Param field as defined in RFC 5424. Append the index in square brackets to refer to the SD-Param field in the specified index: SDParamValue[index]

This setting is applicable when receiving messages.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

The example below demonstrates how to obtain the structured data information from a received message:

  int ReceivedSDElementCount = Int32.Parse(syslog.Config("ReceivedSDElementCount"));
  for(int i=0; i < ReceivedSDElementCount; i++)
  {
    syslog.Config("ReceivedSDElementIndex="+ i.ToString());
    int ReceivedSDParamCount = Int32.Parse(syslog.Config("ReceivedSDParamCount"));
    for(int j=0; j < ReceivedSDParamCount; j++)
    {
      Console.WriteLine("Param Name: " + syslog.Config("ReceivedSDParamName[" + j.ToString() + "]"));
      Console.WriteLine("Param Value: " + syslog.Config("ReceivedSDParamValue[" + j.ToString() + "]"));
    }
  }

SDElementCount:   Sets the number of Structured-data elements in RFC 5424.

This setting specifies the number of Structured-data elements in RFC 5424.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

SDElementId:   Sets the Sd-Id value of the Sd-element with the specified SDElementIndex in RFC 5424.

This setting specifies the Sd-Id value of the SD-element with the specified SDElementIndex.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

SDElementIndex:   Sets the index of the Structured-Data element in RFC 5424.

This setting specifies the index of the Structured-Data element as defined in RFC 5424.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

SDParamCount:   Sets the number of the Sd-param values for the specified SDElementIndex in RFC 5424.

This setting specifies the number of the SD-param values for the specified SDElementIndex.

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

SDParamName:   Sets the name of the SD-Param field in RFC 5424.

This setting specifies the name of the SD-Param field as defined in RFC 5424. Append the index in square brackets to refer to the SD-Param field in the specified index: SDParamName[index]

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

SDParamValue:   Sets the value of the SD-Param field in RFC 5424.

This setting specifies the value of the SD-Param field as defined in RFC 5424. Append the index in square brackets to refer to the SD-Param field in the specified index: SDParamValue[index]

Note: This setting is only applicable when Version is set to 1 (RFC 5424)

The example below demonstrates how to set the Struct-Data configs:

  syslog.Config("SDElementCount=2");
  syslog.Config("SDElementIndex=0");
  syslog.Config("SDElementID=examplePriority@32473");
  syslog.Config("SDParamCount=1");
  syslog.Config("SDParamName[0]=class");
  syslog.Config("SDParamValue[0]=high");
  syslog.Config("SDElementIndex=1");
  syslog.Config("SDElementID=exampleSDID@32473");
  syslog.Config("SDParamCount=2");
  syslog.Config("SDParamName[0]=iut");
  syslog.Config("SDParamValue[0]=3");
  syslog.Config("SDParamName[1]=eventSource");
  syslog.Config("SDParamValue[1]=Application");

TCPLocalPort:   The local port to use when sending data over TCP.

When using TCP the component will listen for incoming data on the specified LocalPort. When sending data a separate TCP connection is established from the local host to the remote host. The local port used for this connection is defined by this setting. If set to 0 (default) the system chooses an available port. If set to any other value the component will use the specified port.

This setting should only be set when there is a particular reason to do so. Note: This setting is only applicable in JDK versions 1.7 or higher. In earlier JDK versions the LocalPort is permitted to be shared between the listening and sending socket (later JDK versions do not allow this).

TCPMessageDelimiter:   The message delimiter to use (if any) when sending and receiving over TCP.

When UseTCP is set to True messages may be sent and received using either Octet Counting or Non-Transparent-Framing schemes to separate mesagges sent over the wire. This setting defines the delimiter to use in the Non-Transparent-Framing scheme when sending messages. Possible values are:

0 (None - Default) Octet Counting is used, there is no delimiter character
1 (Cr) The carriage return character is used as a message delimiter
2 (Lf) The line feed character is used as a message delimiter
3 (CrLf) The two character carriage return line feed sequence is used as a message delimiter
4 (Null) A single null byte is used as a message delimiter

This setting is only applicable when sending a message and UseTCP is set to True.

UseHostname:   Determines if the local host name or IP address is used in the Syslog header.

If set to false the component will use the IP address of the local host name in the header of the Syslog packet. The default value is true.

UseLocalTime:   Indicates whether to use local time or GMT time for packet timestamps.

Setting this to True will generate timestamps based on the time in your locality, taking into account your time zone. When this option is False (default), GMT timestamps are generated.

Version:   Determines which Syslog version to use.

0 (RFC 3164 - Default) Uses RFC 3164
1 (RFC 5424) Uses RFC 5424

This setting specifies which version of Syslog will be used.

Note: This setting should be set before setting any of the AppName, MsgId, ProcId

UDPPort Configuration Settings

CaptureIPPacketInfo:   Used to capture the packet information.

If this is set to true, the component will capture the IP packet information.

The default value for this setting is False.

Note: This setting is only available in Windows.

DestinationAddress:   Used to get the destination address from the packet information.

If CaptureIPPacketInfo is set to true, then this will be populated with the packet's destination address when a packet is received. This information will be accessible in the DataIn event.

Note: This setting is only available in Windows.

DontFragment:   Used to set the Don't Fragment flag of outgoing packets.

When set to True, packets sent by the component will have the Don't Fragment flag set. The default value is False.

LocalHost:   The name of the local host through which connections are initiated or accepted.

The LocalHost setting contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the component initiate connections (or accept in the case of server components) only through that interface.

If the component is connected, the LocalHost setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

LocalPort:   The port in the local host where the component binds.

This must be set before a connection is attempted. It instructs the component to bind to a specific port (or communication endpoint) in the local machine.

Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by LocalPort after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.

This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.

MaxPacketSize:   The maximum length of the packets that can be received.

This setting specifies the maximum size of the datagrams that the component will accept without truncation.

QOSDSCPValue:   Used to specify an arbitrary QOS/DSCP setting (optional).

UseConnection must be True to use this setting. This option allows you to specify an arbitrary DSCP value between 0 and 63. The default is 0. When set to the default value the component will not set a DSCP value.

Note: This setting uses the qWAVE API is only available on Windows 7, Windows Server 2008 R2, and later.

QOSTrafficType:   Used to specify QOS/DSCP settings (optional).

UseConnection must be True to use this setting. You may specify either the text or integer values: BestEffort (0), Background (1), ExcellentEffort (2), AudioVideo (3), Voice (4), and Control (5).

Note: This setting uses the qWAVE API which is only available on Windows Vista and Windows Server 2008 or above.

Note: QOSTrafficType must be set before setting Active to true.

ShareLocalPort:   If set to True, allows more than one instance of the component to be active on the same local port.

This option must be set before the component is activated through the Active property or it will have no effect.

The default value for this setting is False.

UseConnection:   Determines whether to use a connected socket.

UseConnection specifies whether the component should use a connected socket or not. The connection is defined as an association in between the local address/port and the remote address/port. As such, this is not a connection in the traditional TCP sense. What it means is only that the component will send and receive data only to and from the specified destination.

The default value for this setting is False.

UseIPv6:   Whether or not to use IPv6.

By default, the component expects an IPv4 address for local and remote host properties, and will create an IPv4 socket. To use IPv6 instead, set this to True.

Socket Configuration Settings

AbsoluteTimeout:   Determines whether timeouts are inactivity timeouts or absolute timeouts.

If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.

Note: This option is not valid for UDP ports.

FirewallData:   Used to send extra data to the firewall.

When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).

InBufferSize:   The size in bytes of the incoming queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be receiving. Increasing the value of the InBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the component is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

OutBufferSize:   The size in bytes of the outgoing queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be sending. Increasing the value of the OutBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the component is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

Base Configuration Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Tells the component whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the component does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a component is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g. RuntimeLicense, License File).
  • License Type: The type of license installed (e.g. Royalty Free, Single Server).
UseDaemonThreads:   Whether threads created by the component are daemon threads.

If set to True (default), when the component creates a thread the thread's Daemon property will be explicitly set to True. When set to False the component will not set the Daemon property on the created thread. The default value is True.

UseInternalSecurityAPI:   Tells the component whether or not to use the system security libraries or an internal implementation.

By default the component will use the system security libraries to perform cryptographic functions. Setting this to True tells the component to use the internal implementation instead of using the system's security API.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Android Edition - Version 20.0 [Build 8307]