Skip to main content
Version: Pro Edition for Eclipse Mosquitto 3.1

influxdb-bridge-schema

Schema for the InfluxDB® Bridge, which describes all configuration options for the bridge.

{
"title": "InfluxDB-Bridge Plugin Config",
"type": "object",
"properties": {
"version": {
"type": [
"string",
"integer",
"null"
],
"nullable": true,
"description": "Version of the configuration file"
},
"connections": {
"type": "array",
"description": "List of sub-configurations per InfluxDB connection",
"items": {
"type": "object",
"description": "Configuration per InfluxDB connection",
"properties": {
"name": {
"type": "string",
"nullable": false,
"description": "Unique textual identifier of the configuration"
},
"connection": {
"type": "object",
"description": "InfluxDB connection specific configuration",
"properties": {
"driver": {
"type": "string",
"enum": [
"influxdbv1",
"influxdbv2"
],
"nullable": false,
"description": "Name of the InfluxDB driver to use (for InfluxDB v1 or InfluxDB v2/v3)"
},
"hostname": {
"type": "string",
"nullable": false,
"description": "Hostname or IP of the InfluxDB server to connect to"
},
"port": {
"type": "integer",
"nullable": false,
"description": "Port of the InfluxDB server to connect to"
},
"database": {
"type": "string",
"nullable": false,
"description": "Name of the database (or bucket for influxdb v2) to connect to"
},
"organization": {
"type": "string",
"nullable": true,
"description": "Organization that a bucket belongs to in InfluxDB v2"
},
"compression": {
"type": "object",
"nullable": true,
"description": "Properties related to data compression happening before sending it over to InfluxDB",
"properties": {
"enable": {
"type": "boolean",
"nullable": true,
"default": false,
"description": "Whether to compress data before influxdb. Less bandwidth required but inflicts more strain on the server"
}
}
},
"credentials": {
"type": "object",
"nullable": false,
"description": "Credentials to authenticate to InfluxDB. Combine both v1 credentails (username and password) and v2 credentials (tokens). Only one of the two whic corresponds to the InfluxDB version in use must should be selected",
"properties": {
"token": {
"type": "string",
"nullable": true,
"description": "Authentication token for InfluxDB v2 connection"
},
"username": {
"type": "string",
"nullable": true,
"description": "Username for InfluxDB v1"
},
"password": {
"type": "string",
"nullable": true,
"description": "Password for InfluxDB v1"
}
}
},
"ssl": {
"type": "object",
"nullable": true,
"description": "SSL configuration for the connection",
"properties": {
"ca": {
"type": "string",
"nullable": true,
"description": "CA certificate file to use for the connection"
},
"caPath": {
"type": "string",
"nullable": true,
"description": "CA certificate path to use for the connection"
},
"rejectUnauthorized": {
"type": "boolean",
"nullable": true,
"description": "Whether to reject unauthorized connections or not"
}
}
},
"debug": {
"type": "boolean",
"nullable": true,
"description": "Whether to enable debug query logging for connection"
},
"lazyConnect": {
"type": "boolean",
"nullable": true,
"default": false,
"description": "Whether to allow the plugin to continue if the connection to the database cannot be established"
}
},
"nullable": false,
"required": [
"driver"
]
},
"options": {
"type": "object",
"nullable": true,
"description": "Plugin options for configuring internal queues and buffers",
"properties": {
"bufferSize": {
"type": "integer",
"nullable": true,
"minimum": 1,
"description": "Maximum number of messages to buffer before flushing to the database"
},
"timeoutMs": {
"type": "integer",
"nullable": true,
"minimum": 0,
"description": "Maximum time in milliseconds to buffer messages before flushing to the database"
},
"queueMaxSize": {
"type": "integer",
"nullable": true,
"minimum": -1,
"description": "Maximum number of messages in retry queue"
},
"maxRetries": {
"type": "integer",
"nullable": true,
"minimum": 0,
"description": "Maximum number of retries for failed inserts due to lost connection"
},
"retryDelayMs": {
"type": "integer",
"nullable": true,
"minimum": 0,
"description": "Delay in milliseconds before retrying inserts failed due to lost connection"
}
}
},
"topicMappings": {
"type": "array",
"description": "List of topic mapping objects to forward MQTT messages to InfluxDB",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": false,
"description": "Unique identifier of this mapping"
},
"schemaMapping": {
"type": "string",
"nullable": false,
"description": "Name of the schema mapping which should be applied here"
},
"target": {
"type": "string",
"description": "InfluxDB measurement to forward MQTT messages to"
},
"options": {
"type": "object",
"nullable": true,
"description": "Optional options for the measurement"
},
"mqttTopics": {
"type": "array",
"items": {
"type": "string",
"description": "List of MQTT topics to forward messages from"
}
}
},
"required": [
"name",
"target",
"mqttTopics"
]
}
}
},
"required": [
"name",
"connection",
"topicMappings"
]
}
},
"schemaMappings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": false,
"description": "Unique identifier of the mapping"
},
"mapping": {
"type": "array",
"description": "List of mappings to apply to InfluxDB. Each schema contains a mapping of InfluxDB fields/tags to MQTT message properties",
"items": {
"type": "object",
"description": "Properties to select from the MQTT message and insert into InfluxDB",
"properties": {
"source": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null",
"nullable": true
}
],
"description": "JSON path to the value to insert or constant value"
},
"target": {
"type": "string",
"description": "Name of the field or tag to insert data from \"source\" into"
},
"targetType": {
"type": "string",
"enum": [
"tag",
"field",
"lineProtocol"
],
"description": "Whether the target is a tag or a field in InfluxDB"
},
"type": {
"type": "string",
"nullable": true,
"description": "Data type of the value to cast source to before inserting"
},
"options": {
"type": "object",
"nullable": true,
"description": "Optional options for the field or tag",
"properties": {
"isConst": {
"type": "boolean",
"nullable": true,
"description": "Whether the source is a constant value"
}
}
}
},
"required": [
"source",
"target",
"targetType"
]
}
}
},
"required": [
"name",
"mapping"
]
}
}
},
"required": [
"connections",
"schemaMappings"
]
}