Megaladata Integrator Configuration
To configure Megaladata Integrator, use the XML file named Integrator.dll.config. The application expects this file at the default location: /var/opt/Megaladata/integrator/Integrator.dll.config.
Connection to Megaladata Server
Megaladata Integrator supports simultaneous connections to several Megaladata Server instances.
The configuration element contains a settings element, where you can add the following attributes:
shutdownTimeout: An optional attribute that sets the Integrator's shutdown timeout. If Megaladata Integrator has active requests during shutdown, it waits for this timeout before terminating all connections to the Megaladata Server. The Integrator does not accept new requests during the shutdown wait period. Default value (in seconds):30.swaggerUI: An attribute that accepts atrue/falsevalue to enable or disable theopenapi/index.htmlpage. This page provides access to published services via Swagger UI for interactive API documentation and convenient API testing. Setting this attribute tofalsedoes not disable access to the web services.sessionCacheSize: Sets the size of the connection cache for the Megaladata Server (default value is3). The Integrator creates a separate cache of this size for each Megaladata Server.urlPathPrefix: An optional attribute that acts as a prefix for the addresses of all REST and SOAP endpoints. The default value is an empty string. For example, if you deploy Megaladata Integrator athttp://localhost/mgiand do not specify theurlPathPrefixattribute, users can access the help pages at:- REST:
http://localhost/mgi/rest/help - SOAP:
http://localhost/mgi/soap?wsdl
If you set urlPathPrefix="abc", the addresses change to:
- REST:
http://localhost/mgi/abc/rest/help - SOAP:
http://localhost/mgi/abc/soap?wsdl
The following paths host the description of a specific package:
- REST:
/mgi/rest/<PackageName>/helpor/mgi/abc/rest/<PackageName>/help - SOAP:
/mgi/soap/<PackageName>or/mgi/abc/soap/<PackageName>
For each Megaladata Server instance, add a server element within the configuration/settings element. Set the following attributes:
unixsocket: Allows connection via a Unix domain socket. Default value:/run/Megaladata/Megaladatad.socket.address: Defines the network address of the Megaladata Server host. Required attribute. Default value:localhost.port: Defines the TCP port of the server. Default value:4580.userName: Specifies the account name authorized to log in as a service. If you omit this attribute, the system uses the login and password for theserviceuser.password: Specifies the password for the account authorized to log in as a service. Default is an empty string.reserved: An attribute that, when set totrue, marks the server as a backup.packageRefreshPeriod: Defines the interval (in seconds) at which the Integrator requests the list of published packages from the server. The Integrator compares this list with its own and applies any found changes. If you omit this parameter, the Integrator will not request package list updates.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log" type="Integrator.Core.LogConfigurationSection, IntegratorCore" />
<section name="megaladata" type="Integrator.Core.MegaladataConfigurationSection, IntegratorCore" />
</configSections>
<log>
<fileSystem level="Off" maxArchiveFiles="30" encoding="utf-8" />
<eventLog level="Off" />
<console level="Off" />
<journald level="Info" maxEntrySize="65536" />
<internal level="Error" />
</log>
<settings swaggerUI="true" urlPathPrefix="Service.svc" sessionCacheSize="3">
<server unixsocket="/run/megaladata/megaladatad.socket" address="localhost" port="4580" userName="service" password="service" />
</settings>
</configuration>
Megaladata Integrator maintains information about server health and published packages.
When a request arrives, the Integrator randomly chooses a server from the available primary (non-redundant) servers that provide the required package. If no primary servers are available, the Integrator selects a server randomly from the available backup (redundant) servers.
Working directory
The working directory stores temporary data required for the application to function.
The Integrator uses /var/opt/megaladata/integrator as the default path. You can override this value in the workDir attribute of the configuration/settings element using an absolute or relative (to the config file) path. If you run multiple Megaladata Integrator instances, you must assign each a different working directory.
Logging
The configuration/log element specifies the logging parameters. The following modes are available:
- fileSystem: writes logs to a file.
- console: outputs logs to the console.
- journald: outputs logs to
journald. - internal: writes internal logging event logs (e.g., records errors when writing logs to a file).
You can assign each mode a minimum level of detail:
- All: records all events.
- Trace: traces fine-grained execution details.
- Debug: captures information useful for debugging.
- Info: tracks general application progress.
- Warn: highlights potential harmful situations.
- Error: reports errors that allow the app to continue.
- Fatal: logs severe failiures that stop the application.
- Off: disables all logging.
By default, the system enables writing to journald with the Info detail level.
Note: Service request and response text is recorded in the log only when the logging level is at least Trace.
Writing to a file
The configuration/log/fileSystem element defines the file recording parameters:
- path: sets the absolute or relative path to the log directory. Default:
Logs. - maxArchiveFiles: limits the number of archived logs. Default:
0(allows an unlimited number of files). - level: sets the minimum logging level. Default:
All.
The system writes logs to the /var/opt/Megaladata/integrator/Logs directory using the filename log.log. The integrator creates new files daily and names old files using the format log.yyyy-MM-dd.log.
Recording event logs in journald
The journald element in the configuration file defines the recording parameters. The default configuration uses <journald level="Info" maxEntrySize="65536"/>.
The level attribute sets the detail level, and the maxEntrySize attribute sets the maximum message size in bytes. If the attribute is missing or contains a negative value, the system uses the default value: 2147483647. If a message exceeds the maxEntrySize value, the Integrator records only the highest priority fields that fit and may truncate the final field.
Outputting logs to the console
The console element of the config file defines the console log output and logging level. By default, the console uses the same message format as logging to a file. However, if you set the environment variable DOTNET_RUNNING_IN_CONTAINER to true or 1 (indicating that Megaladata Integrator runs in a container), the Integrator omits the current date and time from the messages.
The Integrator writes messages with a level of Warn and higher to stderr and all others to stdout. If you redirect logs from a container console to the host's journald, the system splits multi-line messages into separate journald entries.
Journalling internal logging events
The configuration/log/internal element sets the parameters for logging internal events:
- path: Sets the path to the log directory: absolute or relative (from the working directory). Default:
Logs - level: Sets the minimum logging level. Default:
All
The system uses the file name logger-internal.log for these events.
Read on: Applying Licenses