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>
    </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.
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])
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 appplication default warning threshold ms before a warning is generated for an overloaded active app.
(Default = 500 ms)

Message Handling

All applications use the following messages:

Any application which generates EDRs will use the following messages: