Configuration Reference
The reference material below documents system configuration settings found in MOPS 4.0.
Overview of the all the configuration files
All paths in tables below prefixed with “./” is relative to the [MOPS4.0_INSTALLDIR], a directory that is decided during initial installation.
[MOPS4.0_INSTALLDIR]\
conf\
binder\
config.json
mops-cms-conditionmonitor\
config.json
db-config.json
mops-cms-alertmgr\
config.json
db-config.json
mops-cms-emailchannel\
config.yml
mops-cms-notif\
.env
mops-cms-logchannel\
.env
mops-dir\
mops-dir.config
mops-dd\
mops-dd.config
mops-pqis-core\
mops-pqis-core.config
mops-event-broker\
eventbroker.config
general\
general-config.json
ingress\
rules.yml
keycloak\
keycloak.conf
shell\
config.json
.env
Binder Settings
These settings controls the Binder, our application that presents Help and Manuals pages. The syntax of the configuration file is described here: Binder configuration file.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| JSON | ./conf/binder/ |
config.json |
Help & Manual configuration |
CMS Condition Monitor Settings
| Format | Path | Filename | Purpose |
|---|---|---|---|
| JSON | ./conf/mops-cms-conditionmonitor/ |
config.json |
MQTT configuration |
| JSON | ./conf/mops-cms-conditionmonitor/ |
db-config.json |
Database configuration |
Configuration file example config.json:
{
"mqtt": {
"protocol": "tcp",
"host": "mops-event-broker",
"port": 1883,
"path": "/event",
"rootPath": "mops/historian/SITE/#"
}
}
Description of config.json keys and values:
| Name | Type | Description |
|---|---|---|
| protocol | string | “tcp” as default. “ws”, “wss” for websockets/secure websockets. |
| host | string | Host name of broker container. Typically “mops-event-broker” or “ingress”. |
| port | int | Port used on host for MQTT. Typically 1883, if host=ingress it is 80 to route through for MQTT-connection or 9001 for a websockets connection. |
| path | string | MQTT over Websockets can configure a path. Typically “/event”. |
| rootPath | string | MQTT Topic filter. Wildcards /+/ matches all topics in a certain level. |
Configuration file example db-config.json:
{
"database": "alertdb",
"user": "u_alertdb",
"password": "<password>",
"host": "mpoks-db02.tl.pvt",
"port": "5432"
}
Description of db-config.json keys and values:
| Name | Type | Description |
|---|---|---|
| database | string | Database name. Typically “alertdb”. |
| user | string | Database user name. Typically “u_alertdb”. |
| password | string | Database password. |
| host | string | Database server address. |
| port | string | Database port number. Typically “5432”. |
CMS Alert Manager Settings
These settings mainly involves CMS communication with other nodes using MQTT and connections to the alert database.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| JSON | ./conf/mops-cms-alertmgr/ |
config.json |
MQTT configuration |
| JSON | ./conf/mops-cms-alertmgr/ |
db-config.json |
Database configuration |
Configuration file example config.json:
{
"mqtt": {
"protocol": "tcp",
"host": "mops-event-broker",
"port": 1883,
"mqttVersion": 4,
"reconnect": 1000,
"timeout": 30000,
"path": "/event",
"rootPath": "mops/historian/SITE/#"
}
}
Description of config.json keys and values:
| Name | Type | Description |
|---|---|---|
| protocol | string | “tcp” as default. “ws”, “wss” for websockets/secure websockets. |
| host | string | Host name of broker container. Typically “mops-event-broker” or “ingress”. |
| port | int | Port used on host for MQTT. Typically 1883, if host=ingress it is 80 to route through for MQTT-connection or 9001 for a websockets connection. |
| mqttVersion | int | Version of MQTT protocol. Typically 4 or 5. |
| reconnect | int | The time in milliseconds before attempting to reconnect after a disconnection |
| timeout | int | The time in milliseconds to wait for a connection to be established before timing out |
| path | string | MQTT over Websockets can configure a path. Typically “/event”. |
| rootPath | string | MQTT Topic filter. Wildcards as /+/ matches all topics in a certain level. |
Configuration file example of db-config.json:
{
"database": "alertdb",
"user": "u_alertdb",
"password": "<password>",
"host": "mpoks-db02.tl.pvt",
"port": "5432"
}
Description of db-config.json keys and values:
| Name | Type | Description |
|---|---|---|
| database | string | Database name. Typically “alertdb”. |
| user | string | Database user name. Typically “u_alertdb”. |
| password | string | Database password. |
| host | string | Database server address. |
| port | string | Database port number. Typically “5432”. |
CMS E-Mail Channel Service Settings
These settings involves SMTP and email connectivity.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| YAML | ./conf/mops-cms-emailchannel/ |
config.yml |
SMTP and email configuration |
Configuration file example:
sender: "MOPS 4.0 Notifications <no-reply@mopssys.com>"
smtp-server: "smtp.tl.pvt:25"
recipients:
- "example.mail@mopssys.com"
logging: true
loglevel: "ERROR"
Description of config.yml keys and values:
| Name | Type | Description |
|---|---|---|
| sender | string | Inserted in Email ‘from’ field. |
| smtp-server | string | : |
| recipients | string | Insertd in Email ’to’ field. |
| logging | boolean | Logging enabled/disabled = true/false. |
| loglevel | string | “ERROR”, “WARNING”, “DEBUG”, “INFO” |
CMS Notification Service Settings
These settings controls how this service communicates with the event broker over MQTT and logging of notification.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| ENV-file | ./conf/mops-cms-notif/ |
.env |
MQTT Eventbroker configuration |
Configuration file example:
LOGCHANNEL_URL=http://mops-cms-logchannel:4000/logchannel/sendqueue/
EMAILCHANNEL_URL=http://mops-cms-emailchannel:4000/send
BROKER_URL=ws://mops-event-broker:9001
Description of config.yml keys and values:
| Name | Type | Description |
|---|---|---|
| LOGCHANNEL_URL | string | Internal network URL to log channel sendqueue. |
| EMAILCHANNEL_URL | string | Internal network URL to email channel sendqueue. |
| BROKER_URL | string | WebSockets URL for events. |
The configuration of this service follows the format for: MOPS 4.0 Native Service Configuration.
Directory Service Settings
This configuration controls database connections, security settings, MQTT messaging, HTTP server behavior, and logging outputs and levels for the Directory Service - the main backend service.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| JSON | ./conf/mops-dir/ |
mops-dir.config |
Configuration of the Directory Service |
The configuration of this service follows the format for: MOPS 4.0 Native Service Configuration.
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 |
PQIS Core Service Settings
This configuration controls database connections, security settings, MQTT messaging, HTTP server behavior, and logging outputs and levels for the PQIS Core Service.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| JSON | ./conf/mops-pqis-core/ |
mops-pqis-core.config |
Configuration of the PQIS Core Service |
The configuration of this service follows the format for: MOPS 4.0 Native Service Configuration.
Event Broker Service Settings
These settings configure the event broker’s logging outputs (all logs to stdout and a file), define listeners for MQTT (port 1883) and WebSocket (port 9001) protocols using IPv4.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| TEXT | ./conf/mops-event-broker/ |
eventbroker.config |
MQTT & websockets configuration |
Configuration file example:
# Configure logging
log_type all
log_dest stdout
log_dest file C:\mops\logs\eventbroker.log
# Port to use for the default listener.
listener 1883
protocol mqtt
listener 9001
protocol websockets
socket_domain ipv4
Description of eventbroker.config keys and values:
| Name | Type | Description |
|---|---|---|
| log_type | string | Log type. Typically all |
| log_dest | string | Can be multiple. Typically stdout or file |
| listener | int | Listener and protocol are added in pairs. Typically 1883 or 9001 |
| protocol | string | Listener and protocol are added in pairs. Typically mqtt or websockets |
| socket_domain | string | Limiting sockets to ipv4 is currently needed for websockets protocol |
General Settings
| Format | Path | Filename | Purpose |
|---|---|---|---|
| JSON | ./conf/general/ |
general-config.json |
Configuration of the Directory Service |
Configuration file example:
{
"baseUrl": "https://<MOPS_URL>.com",
"auth": {
"general": {
"token_uri": "https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/token",
"redirect_uri": "https://<MOPS_URL>.com/callback"
},
"mops_services": {
"client_id": "<CLIENT_ID>",
"client_secret": "<CLIENT_SECRET>",
"grant_type": "client_credentials",
"scope": "api://<CLIENT_ID>/.default"
}
}
}
Ingress Settings
| Format | Path | Filename | Purpose |
|---|---|---|---|
| YAML | ./conf/ingress/ |
rules.yml |
Traeffik reverse-proxy configuration |
These settings controls Ingress settings. The syntax of the configuration file is described here: Ingress configuration file.
KeyCloak Settings
Keycloak can handle identity and access management for MOPS 4.0 without need of Internet connection. KeyCloak settings configures this functionallity.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| TEXT | ./conf/keycloak/ |
keycloak.conf |
KeyCloak settings configuration |
Configuration file example:
# Basic settings for running in production. Change accordingly before deploying the server.
# Database
# The database vendor.
db=postgres
db-username=u_keycloakdb
db-password=<password>
# The full database JDBC URL. If not provided, a default URL is set based on the selected database vendor.
db-url=jdbc:postgresql://{{databaseServer}}:{{databasePort}}/keycloakdb
# db-url=jdbc:postgresql://mops4.0-db01:5432/keycloakdb
# The schema for the keycloak tables
db-schema=keycloak
# Observability
# If the server should expose healthcheck endpoints.
health-enabled=true
# If the server should expose metrics endpoints.
metrics-enabled=true
# HTTP
# The file path to a server certificate or certificate chain in PEM format.
# https-certificate-file=C:/mops/cert/server.crt.pem
# The file path to a private key in PEM format.
# https-certificate-key-file=C:/mops/cert/server.key.pem
# The proxy address forwarding mode if the server is behind a reverse proxy.
#proxy=reencrypt
# Do not attach route to cookies and rely on the session affinity capabilities from reverse proxy
#spi-sticky-session-encoder-infinispan-should-attach-route=false
# Hostname for the Keycloak server.
hostname=http://{{hostname}}/keycloak
# Relative path for RESOURCES. Looks like it is based purely on base URL.
http-relative-path=/keycloak
| Name | Type | Description |
|---|---|---|
| db | string | The database vendor to use. Default is postgres. |
| db-username | string | Username for connecting to the database. |
| db-password | string | Password for connecting to the database. |
| db-url | string | Full JDBC URL for the database. If not specified, a default URL is derived from the vendor. |
| db-schema | string | Schema in the database where Keycloak tables are stored. |
| health-enabled | boolean | Whether the server should expose health check endpoints. Defaults to true. |
| metrics-enabled | boolean | Whether the server should expose metrics endpoints. Defaults to true. |
| https-certificate-file | string | File path to the server certificate or certificate chain in PEM format. |
| https-certificate-key-file | string | File path to the private key in PEM format. |
| proxy | string | Proxy forwarding mode if behind a reverse proxy. Typical value: reencrypt. |
| spi-sticky-session-encoder-infinispan-should-attach-route | boolean | Whether to attach route to cookies. Default is false when using session affinity from proxy. |
| hostname | string | Hostname or base URL for the Keycloak server. |
| http-relative-path | string | Relative path for Keycloak resources, typically appended to the base URL. |
Shell Service Settings
The configuration of the Shell service.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| JSON | ./conf/shell/ |
config.json |
Authentication & MQTT configuration |
{
"auth": {
"issuer": "https://login.microsoftonline.com/<TENANT_ID>/v2.0",
"client_id": "<CLIENT_ID>",
"redirect_uri": "https://<MOPS_URL>.com/callback",
"response_type": "code",
"scope": "openid profile email offline_access api://<CLIENT_ID>/mops",
"load_user_info": false,
"rootPath": "",
"userManagerSettings": {
"includeIdTokenInSilentRenew": true,
"accessTokenExpiringNotificationTime": 60
},
"log": {
"type": "console",
"level": 4
}
}
}
Example of auth configuration
| Name | Type | Description |
|---|---|---|
| issuer | string | URL of the authorization server, including the tenant ID. |
| client_id | string | Client ID used to identify the application during authentication. |
| redirect_uri | string | URI where the authorization server redirects after authentication. |
| response_type | string | Response type for the OAuth2 flow, typically code. |
| scope | string | Space-separated list of scopes defining access privileges, such as openid, profile, and API scopes. |
| load_user_info | boolean | Whether to load additional user information after login. Defaults to false. |
| rootPath | string | Root path for the application. Leave empty if not needed. |
| userManagerSettings | object | See the 2 descriptions (uMS.) below: |
| uMS.includeIdTokenInSilentRenew | boolean | Specifies if ID tokens should be included during silent token renewal. |
| uMS.accessTokenExpiringNotificationTime | int | Time (in seconds) before token expiration to trigger a notification. Default is 60. |
| log | object | See the 2 descriptions (log.) below: |
| log.type | string | Type of logging mechanism, e.g., console. |
| log.level | int | Logging verbosity level; higher values provide more detailed logs. |
.ENV configuration file
The .env file in the Docker Compose context is used to define environment variables that can be referenced in the docker-compose.yml file, allowing configuration values such as ports, image versions, and other settings to be managed centrally and dynamically.
| Format | Path | Filename | Purpose |
|---|---|---|---|
| ENV-file | ./ |
.env |
Define variables that can be referenced in the docker-compose.yml |
The configuration of this file follows the format for: Docker-compose .ENV-file format.