Applies to: reference, configuration

Historian Service Settings

This configuration controls database connections to historian databases, security settings, HTTP server behavior, and logging outputs and levels for the Historian Service.

Format Path Filename Purpose
JSON ./conf/mops-historian/ mops-historian.config Historian Service configuration

The configuration of this service follows the format for: MOPS 4.0 Native Service Configuration.

Configuration File Example

{
  "database": {
    "connections": [
      {
        "nameserver": "node=<hostname>,port=12000",
        "dbname": "demo",
        "dbnode": "<hostname>",
        "user": "<username>",
        "password": "<password>",
        "source": "hist",
        "pool_size": 10,
        "authentication": {
          "type": "session",
          "claim": "email"
        }
      }
    ],
    "default_source": "hist",
    "query_scheduler_threads": 20
  },
  "security": {
    "security_mode": "token",
    "jwks_cache": false,
    "jwks_cache_folder": "",
    "issuers": [
      "https://login.microsoftonline.com/<tenant-id>/v2.0"
    ]
  },
  "ntservice": {
    "service_name": "mops-historian",
    "display_name": "MOPS Historian Service",
    "description": "MOPS 4.0 Historian Service for time-series data management",
    "username": "",
    "password": ""
  },
  "http": {
    "address": "0.0.0.0",
    "port": 9996
  },
  "log": {
    "flushInterval": 10,
    "sinks": [
      { "type": "console" },
      {
        "type": "file",
        "path": "logs/mops-historian.log",
        "strategy": "timestamped",
        "maxSize": 64,
        "maxFiles": 10,
        "rotateOnOpen": false
      }
    ],
    "loggers": {
      "default": { "level": "err" },
      "http": { "level": "err" },
      "sec": { "level": "err" },
      "hist": { "level": "err" }
    }
  }
}

Service-Specific Settings

database

The database section for the Historian Service differs from other native services by using a connections array instead of pools.

Name Type Description
connections array Array of historian database connection configurations
default_source string Default source name when not specified in requests
query_scheduler_threads int Number of threads for query scheduling

connections[]

Name Type Description
nameserver string Historian nameserver connection string (node and port)
dbname string Database name
dbnode string Database node hostname
user string Database username
password string Database password
source string Source identifier used in tag notation source::tag.attr
pool_size int Connection pool size for this source
authentication object Authentication configuration for database connections
authentication.type string Authentication type: session or cloaking
authentication.claim string JWT claim for user identity (used with cloaking type)