pronghorn-core Schemas

On this page:

services-schema

{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "services-schema", "type": "object", "title": "Services Schema", "description": "All of the properties required for a service.", "properties": { "loggerProps": { "$ref": "#/definitions/loggerProps" }, "isEncrypted": { "$ref": "#/definitions/isEncrypted" }, "profiling": { "type": "boolean", "title": "profiling", "default": false, "description": "Whether or not to profile this service", "examples": [ true, false ] }, "model": { "$ref": "#/definitions/model" }, "name": { "$ref": "#/definitions/name" }, "type": { "$ref": "#/definitions/type" }, "properties": { "type": "object", "title": "Properties", "description": "The properties of a service", "properties": {} }, "virtual": { "$ref": "#/definitions/virtual" }, "systemProps": { "type": "object", "title": "System Properties", "description": "Properties used to configure IAP process.", "properties": { "maxOldSpaceSize": { "type": "number", "title": "maxOldSpaceSize", "description": "Sets the limit heap memory size on service child process.", "minimum": 100, "examples": [ 2048, 1024 ] } } }, "eventDeduplication": { "type": "object", "title": "eventDeduplication", "description": "Properties used by the event-system to deduplicate events", "required": [ "active", "cacheTtl", "uniqueProps" ], "properties": { "active": { "type": "boolean", "description": "Whether or not event deduplication is configured", "title": "Active" }, "cacheTtl": { "type": "integer", "description": "The time to live set up for event deduplication", "title": "Cache Ttl", "examples": [ 10000 ] }, "uniqueProps": { "type": "array", "description": "Unique properties set up in event deduplication", "title": "Unique Props", "items": { "type": "string", "examples": [ "/messageId" ] } } } } }, "oneOf": [ { "properties": { "type": { "const": "Application" }, "properties": { "properties": {} } } }, { "properties": { "type": { "const": "Adapter" }, "properties": { "properties": { "id": { "type": "string", "title": "id", "default": "", "description": "The id for the service", "const": { "$data": "2/name" }, "examples": [ "Local AAA" ] }, "type": { "type": "string", "title": "Type", "default": "", "description": "The type of service", "examples": [ "local_aaa" ] }, "properties": { "type": "object", "properties": {} }, "brokers": { "type": "array", "uniqueItems": true, "description": "Brokers which utilize this service", "items": { "type": "string", "description": "Name of the broker", "enum": [ "aaa", "compliance", "device", "fault", "instance", "inventory", "method", "notification", "performance", "persistence", "service", "topology" ], "examples": [ "aaa" ] } }, "groups": { "type": "array", "description": "Groups which can use this service", "items": { "type": "string", "description": "The mongo id of the group", "examples": [ "5fe9f10cc1fca243d562e1d8" ], "pattern": "^[0-9a-f]{24}$" } } }, "required": [ "id", "type", "properties", "brokers", "groups" ] } } } ], "required": [ "loggerProps", "isEncrypted", "model", "name", "type", "properties" ], "additionalProperties": false, "definitions": { "log_level": { "type": "string", "examples": [ "error", "warn", "info", "debug", "trace", "spam" ], "enum": [ "error", "warn", "info", "debug", "trace", "spam" ] }, "sys_log_level": { "type": "string", "examples": [ "debug", "info", "warning", "error" ], "enum": [ "debug", "info", "warning", "error" ] }, "name": { "type": "string", "title": "Name", "default": "", "description": "The name of the service", "pattern": "^[^\\/]+$", "examples": [ "Local AAA" ] }, "model": { "type": "string", "title": "Model", "default": "", "description": "The model used by the service", "examples": [ "@itential/adapter-local_aaa" ], "pattern": "^@[-_.a-z]+/.+" }, "isEncrypted": { "type": "boolean", "title": "isEncrypted", "default": false, "description": "Whether or not this service is encrypted", "examples": [ true, false ] }, "type": { "type": "string", "title": "Type", "default": "Application", "description": "If the service is an app or adapter", "enum": [ "Application", "Adapter" ] }, "loggerProps": { "type": "object", "properties": { "description": { "type": "string", "description": "The description property", "title": "Description", "default": "Logger Settings", "examples": [ "Logging" ] }, "log_directory": { "type": "string", "title": "Directory", "description": "The directory to store Pronghorn log files.", "default": "/var/log/pronghorn", "examples": [ "/var/log/pronghorn" ] }, "log_filename": { "type": "string", "description": "The name of the current Pronghorn log file.", "title": "Filename", "default": "pronghorn.log", "examples": [ "pronghorn.log" ] }, "log_max_file_size": { "type": "integer", "title": "Max File Size", "description": "The maximum size of each Pronghorn log file in bytes.", "default": 1048576, "examples": [ 1048576 ] }, "log_max_files": { "type": "integer", "description": "The maximum number of log files maintained on the server.", "title": "Max Number of Files", "default": 100, "examples": [ 100 ] }, "log_timezone_offset": { "type": "integer", "description": "An integer specifying the offset from GMT/UTC time that will be used when writing to the log files.", "title": "Timezone Offset", "default": 0, "examples": [ -5 ], "minimum": -12, "maximum": 12 }, "log_level": { "$ref": "#/definitions/log_level" }, "console_level": { "$ref": "#/definitions/log_level" }, "metrics_filename": { "type": "string", "description": "The name of the job metrics log file, if applicable.", "title": "Metrics Filename", "default": "metrics.log", "examples": [ "metrics.log" ] }, "metrics_max_files": { "type": "integer", "description": "The maximum number of job metrics log files maintained on the server, if applicable.", "title": "Max Number of Metrics Files", "default": 31, "examples": [ 31 ] }, "metrics_rotation_interval": { "type": "string", "description": "The time until the metrics log is rotated in minutes, hours, days, or weeks, if applicable.", "title": "Rotation Interval of Metrics Files", "default": "7d", "examples": [ "7d" ] }, "metrics_rotation_size": { "type": "string", "description": "The maximum file size before the metrics log is rotated in kilobytes, megabytes, or gigabytes, if applicable.", "title": "Rotation Size of Metrics Files", "default": "10M", "examples": [ "10M" ] }, "syslog": { "type": "object", "description": "The syslog properties allow Pronghorn to send log messages to a local or remote syslog daemon.", "properties": { "level": { "$ref": "#/definitions/sys_log_level" }, "host": { "type": "string", "description": "The host running syslogd.", "title": "Host", "default": "localhost", "examples": [ "localhost" ] }, "port": { "type": "integer", "description": "The port on the host that syslog is running on.", "title": "Port", "default": 514, "minimum": 1, "maximum": 65535, "examples": [ 514 ] }, "protocol": { "type": "string", "title": "Protocol", "description": "The network protocol to log over. Can be one of tcp4, udp4, unix or unix-connect.", "default": "udp4", "examples": [ "udp4" ], "enum": [ "tcp4", "udp4", "unix", "unix-connect" ] }, "facility": { "type": "string", "description": "Syslog facility to use.", "title": "Facility", "default": "local0", "examples": [ "local0" ] }, "type": { "type": "string", "title": "Type", "description": "The type of syslog protocol to use. Possible values are BSD and 5424.", "default": "BSD", "examples": [ "5424" ], "enum": [ "BSD", "5424" ] }, "path": { "type": "string", "title": "Path", "description": "The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).If path is used, host, port and protocol do not need to be configured.", "default": "", "format": "uri-reference", "examples": [ "/dev/log" ] }, "pid": { "type": "string", "description": "Process identifier (PID) of the process that log messages are coming from (Default is process.pid).", "title": "Process Id", "default": "process.pid", "examples": [ "process.pid" ] }, "localhost": { "type": "string", "description": "Host to indicate that log messages are coming from.", "title": "Log Host", "default": "", "examples": [ "localhost" ] }, "app_name": { "type": "string", "description": "The name of the application.", "title": "Application Name", "default": "", "examples": [ "process.title" ] }, "eol": { "type": "string", "title": "End of Line Character", "description": "The end of line character to be added to the end of the message.", "default": "", "examples": [ "CR" ] } }, "allOf": [ { "required": [ "level", "facility", "type" ] }, { "anyOf": [ { "required": [ "host", "port", "protocol" ] }, { "required": [ "path" ] } ] } ], "additionalProperties": false } }, "required": [ "log_max_files", "log_max_file_size", "log_level", "log_directory", "log_filename", "console_level" ], "additionalProperties": false }, "properties": { "type": "object", "title": "Properties", "description": "The properties of a service", "properties": {} }, "virtual": { "type": "boolean", "title": "virtual", "default": false, "description": "Whether or not this service is an Integration.", "examples": [ true, false ] } } }