Directory Data Service Settings
This configuration controls database connections, security settings, MQTT messaging, HTTP server behavior, and logging outputs and levels for the Directory Data Service.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| JSON | ./conf/mops-dd/ |
mops-dd.config |
Backend service Directory Data configuration |
The configuration of this service follows the format for: MOPS 4.0 Native Service Configuration.
Configuration File Example
{
"database": {
"pools": {
"pgdb": {
"driver": "postgres",
"connectionString": "postgres://u_dirdb:<password>@<host>:5432/dirdb"
},
"mopsdb": {
"driver": "odbc",
"options": "ODBC_ASYNC_METHOD=POLLING;ODBC_ASYNC_CONNECT=FALSE",
"connectionString": "DRIVER={Oracle in ORADB21Home1};DBQ=<host>:1521/<service>;UID=MOPSSYS;PWD=<password>;"
},
"quality": {
"driver": "odbc",
"options": "ODBC_ASYNC_METHOD=POLLING;ODBC_ASYNC_CONNECT=FALSE",
"connectionString": "DSN=<dsn_name>"
}
},
"names": {
"dirdb": "pgdb",
"pqis": "quality"
}
},
"tagbroker": {
"sources": [
{
"name": "hist",
"remote_source": "hist",
"endpoint": "http://localhost:9996/historian",
"keepalive_seconds": 60,
"keepalive_request_count": 100
}
],
"default_source": "hist"
},
"security": {
"jwks_cache": true,
"jwks_cache_folder": "C:\\mops\\cache",
"issuers": [
"https://login.microsoftonline.com/<tenant-id>/v2.0"
]
},
"ntservice": {
"service_name": "mops.dd",
"display_name": "MOPS 4.0 Directory Data",
"description": "MOPS 4.0 Directory Data Service",
"username": "NT AUTHORITY\\NETWORK SERVICE",
"password": ""
},
"http": {
"address": "0.0.0.0",
"port": 9994
},
"settings": {
"directory_endpoint": "http://localhost:9993"
},
"log": {
"flushInterval": 10,
"sinks": [
{ "type": "console" },
{
"type": "file",
"path": "logs/mops-dd.log",
"strategy": "timestamped",
"maxSize": 64,
"maxFiles": 10,
"rotateOnOpen": false
}
],
"loggers": {
"default": { "level": "err" },
"db": { "level": "err" },
"odbc": { "level": "err" },
"http": { "level": "err" },
"sec": { "level": "err" },
"pgsql": { "level": "err" }
}
}
}
Service-Specific Settings
tagbroker
The tagbroker section configures connections to tag data sources.
| Name | Type | Description |
|---|---|---|
| sources | array | Array of tag source configurations |
| sources[].name | string | Source name exposed for tags with notation source::tag.attr |
| sources[].remote_source | string | The source name on the remote service |
| sources[].endpoint | string | URL endpoint of the tag broker service |
| sources[].keepalive_seconds | int | Keepalive interval in seconds |
| sources[].keepalive_request_count | int | Number of requests before keepalive refresh |
| default_source | string | Default source when not specified in tag notation |
settings
| Name | Type | Description |
|---|---|---|
| directory_endpoint | string | URL endpoint of the Directory Service (mops-dir) |
ntservice
The ntservice section configures the Windows service properties when running as a native Windows service.
| Name | Type | Description |
|---|---|---|
| service_name | string | Internal Windows service name |
| display_name | string | Display name shown in Windows Services Manager |
| description | string | Service description |
| username | string | Windows account to run the service under |
| password | string | Password for the service account (if required) |