Device Monitoring Studio Server reads its configuration from the config.json
file located in the same folder as dmssrv.exe
server executable (unless overridden by --config
command-line parameter).
This topic describes the structure of the configuration file. Device Monitoring Studio Server Configuration Utility may also be used as a visual editor of the configuration file.
JSON file format does not support comments. If you use //
or /* ... */
comments in a configuration file, server will treat it as malformed and will refuse to start.
Any configuration file syntax error is considered a critical error.
We will describe the JSON file structure by means of a TypeScript declaration:
interface AccessToken
{
// A list of hardware IDs this token is allowed to monitor.
// An empty list means that all devices are allowed
allowedHardwareIds?: string[];
}
const enum MessageLevel
{
Critical, // 0
Error, // 1
Warning, // 2
Informational, // 3
Debug, // 4
}
interface Config
{
// Full path to log file. Default value is "%PROGRAMDATA%\HHD Software\Device Monitoring Studio Server\dmssrv.log"
logPath?: string = "%PROGRAMDATA%\\HHD Software\\Device Monitoring Studio Server\\dmssrv.log";
// Logging level, specified as number. Default value is 3 (Informational)
logLevel?: MessageLevel = 3;
// Comma-separated list of local endpoints, see below. Default value is an empty string
listenEndpoints?: string = "";
// default TCP port. Default value is 6612
defaultListeningPort?: number = 6612;
// A list of access tokens. Default value is an empty array
authKeys?: AccessToken[] = [];
// Enable server advertisement. Default value is true
advertise?: boolean = true;
// Enable anonymous access. Default value is true
allowAnonymous?: boolean = true;
};
All configuration parameters are optional and provide reasonable defaults if omitted.
listenEndpoints
parameter is a comma-separated list of local endpoints the server listens on. The server supports the following endpoint syntaxes:
hostname
hostname:port
ipv4
ipv4:port
ipv6
[ipv6]:port
*
or empty string*:port
The server reads configuration file only on startup. If you modify the configuration file, make sure the server is restarted to pick up the changes.