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": { "$id": "#/services/loggerProps", "type": "object", "properties": { "description": { "$id": "#/services/loggerProps/properties/description", "type": "string", "description": "The description property", "title": "Description", "default": "Logger Settings", "examples": [ "Logging" ] }, "log_directory": { "$id": "#/services/loggerProps/properties/log_directory", "type": "string", "title": "Directory", "description": "The directory to store Pronghorn log files.", "default": "/var/log/pronghorn", "examples": [ "/var/log/pronghorn" ] }, "log_filename": { "$id": "#/services/loggerProps/properties/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": { "$id": "#/services/loggerProps/properties/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": { "$id": "#/services/loggerProps/properties/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": { "$id": "#/services/loggerProps/properties/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": { "$id": "#/services/loggerProps/properties/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": { "$id": "#/services/loggerProps/properties/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": { "$id": "#/services/loggerProps/properties/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": { "$id": "#/services/loggerProps/properties/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": { "$id": "#/services/loggerProps/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": { "$id": "#/services/loggerProps/properties/syslog/properties/host", "type": "string", "description": "The host running syslogd.", "title": "Host", "default": "localhost", "examples": [ "localhost" ] }, "port": { "$id": "#/services/loggerProps/properties/syslog/properties/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": { "$id": "#/services/loggerProps/properties/syslog/properties/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": { "$id": "#/services/loggerProps/properties/syslog/properties/facility", "type": "string", "description": "Syslog facility to use.", "title": "Facility", "default": "local0", "examples": [ "local0" ] }, "type": { "$id": "#/services/loggerProps/properties/syslog/properties/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": { "$id": "#/services/loggerProps/properties/syslog/properties/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": { "$id": "#/services/loggerProps/properties/syslog/properties/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": { "$id": "#/services/loggerProps/properties/syslog/properties/localhost", "type": "string", "description": "Host to indicate that log messages are coming from.", "title": "Log Host", "default": "", "examples": [ "localhost" ] }, "app_name": { "$id": "#/services/loggerProps/properties/syslog/properties/app_name", "type": "string", "description": "The name of the application.", "title": "Application Name", "default": "", "examples": [ "process.title" ] }, "eol": { "$id": "#/services/loggerProps/properties/syslog/properties/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 }, "isEncrypted": { "$id": "#/services/isEncrypted", "type": "boolean", "title": "isEncrypted", "default": false, "description": "Whether or not this service is encrypted", "examples": [ true, false ] }, "profiling": { "$id": "#/services/profiling", "type": "boolean", "title": "profiling", "default": false, "description": "Whether or not to profile this service", "examples": [ true, false ] }, "model": { "$id": "#/services/model", "type": "string", "title": "Model", "default": "", "description": "The model used by the service", "examples": [ "@itential/adapter-local_aaa" ], "pattern": "^@[-_.a-z]+/.+" }, "name": { "$id": "#/services/name", "type": "string", "title": "Name", "default": "", "description": "The name of the service", "pattern": "^[^\\/]+$", "examples": [ "Local AAA" ] }, "type": { "$id": "#/services/type", "type": "string", "title": "Type", "default": "Application", "description": "If the service is an app or adapter", "enum": [ "Application", "Adapter" ] }, "properties": { "$id": "#/services/properties/properties", "type": "object", "title": "Properties", "description": "The properties of a service", "properties": {} }, "virtual": { "$id": "#/services/virtual", "type": "boolean", "title": "virtual", "default": false, "description": "Whether or not this service is an Integration.", "examples": [ true, false ] }, "systemProps": { "$id": "#/services/systemProps", "type": "object", "title": "System Properties", "description": "Properties used to configure IAP process.", "properties": { "maxOldSpaceSize": { "$id": "#/services/systemProps/maxOldSpaceSize", "type": "number", "title": "maxOldSpaceSize", "description": "Sets the limit heap memory size on service child process.", "minimum": 100, "examples": [ 2048, 1024 ] } } }, "eventDeduplication": { "$id": "#/services/eventDeduplication", "type": "object", "title": "eventDeduplication", "description": "Properties used by the event-system to deduplicate events", "properties": { "active": { "type": "boolean", "$id": "#/services/eventDeduplication/active", "description": "Whether or not event deduplication is configured", "title": "Active" }, "cacheTtl": { "type": "integer", "$id": "#/services/eventDeduplication/cacheTtl", "description": "The time to live set up for event deduplication", "title": "Cache Ttl", "examples": [ 10000 ] }, "algorithm": { "type": "string", "$id": "#/services/eventDeduplication/algorithm", "description": "Algorithm used to hash properties", "title": "Algorithm", "examples": [ "md5" ] }, "uniqueProps": { "type": "array", "$id": "#/services/eventDeduplication/uniqueProps", "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": { "$id": "#/services/properties/properties/id", "type": "string", "title": "id", "default": "", "description": "The id for the service", "const": { "$data": "2/name" }, "examples": [ "Local AAA" ] }, "type": { "$id": "#/services/properties/properties/type", "type": "string", "title": "Type", "default": "", "description": "The type of service", "examples": [ "local_aaa" ] }, "properties": { "$id": "#/services/properties/properties/properties", "type": "object", "properties": {} }, "brokers": { "$id": "#/services/properties/properties/brokers", "type": "array", "uniqueItems": true, "description": "Brokers which utilize this service", "items": { "$id": "#/services/properties/properties/brokers/items", "type": "string", "description": "Name of the broker", "enum": [ "aaa", "compliance", "device", "fault", "instance", "inventory", "method", "notification", "performance", "persistence", "service", "topology" ], "examples": [ "aaa" ] } }, "groups": { "$id": "#/services/properties/properties/groups", "type": "array", "description": "Groups which can use this service", "items": { "$id": "#/services/properties/properties/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": { "$id": "#/services/log_level", "type": "string", "examples": [ "error", "warn", "info", "debug", "trace", "spam" ], "enum": [ "error", "warn", "info", "debug", "trace", "spam" ] }, "sys_log_level": { "$id": "#/services/sys_log_level", "type": "string", "examples": [ "debug", "info", "warning", "error" ], "enum": [ "debug", "info", "warning", "error" ] } } }