App Config (Common)

Overview

All applications that run in the Service Daemon have common configuration options that can be applied to them. These options should be configured at the same level as the individual application parameters, i.e.:

<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
  ...
  <applications>
    ...
    <application name="(name)" module="(module)" overloaded_poll_ms="100" overloaded_active_ms="500">
      <include><lib>/path/to/library</lib></include>
      <parameters>
        <!-- application-specific parameters -->
      </parameters>
      <peers>
        <peer name="BACKUP-DB-APP"/>
        <peer name="BACKUP-REST-APP"/>
      </peers>
    </application>
    ...
  </application>
  ...
</n2svcd>

Parameter Types

N2SVCD Applications support a variety of configuration parameter types, some with defined ranges of possible inputs.

Parameter Type Description
String A string containing any characters, e.g. abc.
Hex String A string containing hexadecimal characters, e.g. 123abc.
Integer A signed whole number, e.g. -1, 0, 1, etc.
Unsigned Integer An unsigned whole number, e.g. 0, 1, 2, etc.
Enumeration As for Unsigned Integer, but within a defined range.
Positive Integer An unsigned positive number, e.g. 1, 2, 3, etc.
Number A number with any sign and optionally a fractional component, e.g. 1.0, 2.5, etc.
Boolean A binary value, represented as any of the case-insensitive possible pairs 1/0, Y/N, YES/NO, ON/OFF, T/F, or TRUE/FALSE.
Array An ordered list of other parameter values of the same type.
Object A container for other arbitrary parameter values.

Configuration Details

The application element attributes for all Application instances are as below.

Attribute Type Description
name String [Required] A unique name for this application instance.
module String [Required] The internal name for the type of the application. Refer to the application-specific configuration for the appropriate value to use.
include Array [Required] An array of directories containing the required application-specific libraries.
lib String [Required] An individual included application library directory. Refer to the application-specific configuration for which libraries are required.
overloaded_poll_ms Integer Set this to override the application default warning threshold ms before a warning is generated for an overloaded non-active app.
(Default = 100 ms)
overloaded_active_ms Integer Set this to override the application default warning threshold ms before a warning is generated for an overloaded active app.
(Default = 500 ms)
peers Array [Required] Array of named Peers which this Application instance will discover at startup, which is a pre-requisite for sending messages to this peer at runtime. Refer to specific Application configuration for the required value(s).
peer String The name of a Peer for startup discovery.
parameters Array [Required] Array of name / value Parameters for this Application instance.
alarm_clear_secs Positive Integer (Max 600) For certain alarms which are raised from detection of behavior exceeding some acceptable threshold (e.g. high traffic, excessive number of warnings being raised) then this parameter specifies the number of seconds for which the behavior must be within acceptable levels before the alarm is cleared.
(Default = 10)
high_load_pc Integer (Range 1 - 100) The load percentage which will trigger a High Load indicator and corresponding alarm.
(Default = 70)
trace_level Enumeration Attempt to enable in-memory tracing for all instances running inside this application, subject to the limitations of the trace_per_second configuration throttle. Tracing levels above debug should be used with care in production systems. Possible values are:
  • 0 = none
  • 1 = debug
  • 2 = dump
  • 3 = spam
(Default = 0)
trace_level_max Enumeration This is a hard cap for trace level enabled dynamically during operation, e.g. via tracing traps or via dynamic change to trace_level using the administration GUI. This is intended to protect production systems from excessive tracing overheads. It is determined at startup time and cannot be modified. Possible values are:
  • 0 = none
  • 1 = debug
  • 2 = dump
  • 3 = spam
(Default = one level higher than the initial value of trace_level)
trace_per_second Positive Integer The maximum number of instances for this application which may have their instance trace log enabled in any given second. If this value is reached, then subsequent requests to activate tracing will be ignored until the start of a new clock second. Values above 1 should be used with care in production systems.
(Default = 1)
retention_count Positive Integer (Max 1,000) The number of most-recent traced dialogs to retain in-memory for monitoring.
(Default = 50)
edr_enabled Boolean Whether this application should send EDRs to an EdrApp for writing (if supported by the application).
(Default = NO, do not send EDRs for writing)
edr_app_name String Name of the EdrApp application which will perform the write-to-disk for EDRs.
(Default = EDR)
default_edr_stream_key String The default EDR stream key that will be used for any EDRs generated by this application.
Most applications will use this default EDR stream key. However, custom service logic or custom configuration may use an alternate stream key.
All EDRs written to the same stream key and processed by the same EdrApp will be interleaved within one file.
The target EdrApp must be explicitly configured to expect the exact stream key.
(Default = [Varies per Application])
stats_slice_secs Positive Integer
(Max 600)
The number of seconds each statistics slice covers. Statistics slices are covered in greater detail as part of Management Summary Response Messages.
(Default = 5)
stats_slice_count Positive Integer
(Max 1000)
The number of historical statistics slices to keep. Statistics slices are covered in greater detail as part of Management Summary Response Messages.
(Default = 60)
snmp_system_description String The value to use for the RFC 3418 sysDescr parameter for inbound requests via the SnmpApp.
Truncated to 255 characters.
(Default = concatenation of `N2SVCD`, internal application name, hostname, and OS architecture type and version)
snmp_system_contact String The value to use for the RFC 3418 sysContact parameter for inbound requests via the SnmpApp.
Truncated to 255 characters.
(Default = '', an empty string
snmp_system_name String The value to use for the RFC 3418 sysName parameter for inbound requests via the SnmpApp.
Truncated to 255 characters.
(Default = hostname
snmp_system_location String The value to use for the RFC 3418 sysLocation parameter for inbound requests via the SnmpApp and outbound SNMP traps.
Truncated to 255 characters.
(Default = hostname
.auth_id_literal Integer Explicit configuration for the literal SNMP authoritative engine ID for this application. This parameter overrides global SNMP trap configuration. Only applicable if no SNMP applications are globally configured for SNMP delivery.
.auth_id_iana_pen Integer Explicit configuration for the IANA Private Enterprise Number for the SNMP authoritative engine ID for this application. This parameter overrides global SNMP trap configuration. Only applicable if no SNMP applications are globally configured for SNMP delivery.
.auth_id_v3_format Boolean Explicit configuration for whether to use SNMP v3 format for the SNMP authoritative engine ID for this application. This parameter overrides global SNMP trap configuration. Only applicable if no SNMP applications are globally configured for SNMP delivery.
.auth_id_value_format Integer Explicit configuration for the SNMP authoritative engine ID format for this application. This parameter overrides global SNMP trap configuration. Only applicable if no SNMP applications are globally configured for SNMP delivery.
.auth_id_value String Explicit configuration for the SNMP authoritative engine ID value for this application. This parameter overrides global SNMP trap configuration. Only applicable if no SNMP applications are globally configured for SNMP delivery.
.auth_id_value_as_text Boolea Explicit configuration for whether the SNMP authoritative engine ID value should be treated as text for this application. This parameter overrides global SNMP trap configuration. Only applicable if no SNMP applications are globally configured for SNMP delivery.
.engine_data_file_base String Explicit configuration for the SNMP authoritative engine ID data file for this application. This parameter overrides global SNMP trap configuration. Only applicable if no SNMP applications are globally configured for SNMP delivery.
context_id_literal Integer Explicit configuration for the literal SNMP context engine ID for this application. This parameter overrides global SNMP trap configuration.
context_id_iana_pen Integer Explicit configuration for the IANA Private Enterprise Number for the SNMP context engine ID for this application. This parameter overrides global SNMP trap configuration.
context_id_v3_format Boolean Explicit configuration for whether to use SNMP v3 format for the SNMP context engine ID for this application. This parameter overrides global SNMP trap configuration.
context_id_value_format Integer Explicit configuration for the SNMP context engine ID format for this application. This parameter overrides global SNMP trap configuration.
context_id_value String Explicit configuration for the SNMP context engine ID value for this application. This parameter overrides global SNMP trap configuration.
context_id_value_as_text Boolean Explicit configuration for whether the SNMP context engine ID value should be treated as text for this application. This parameter overrides global SNMP trap configuration.
snmp_broker_pending_max Integer
200..1000
The maximum amount of SNMP traps generated by this application that may be queued locally for delivery.
If this queue is full, new SNMP traps will be discarded.
(Default: 200)

Message Handling

All applications use the following messages:

Any application which generates EDRs will use the following messages: