Skip to content

Latest commit

 

History

History
executable file
·
256 lines (210 loc) · 13.8 KB

configuration.md

File metadata and controls

executable file
·
256 lines (210 loc) · 13.8 KB
description keywords
This section describes the configuration parameters and their types for INX-MQTT.
IOTA Node
Hornet Node
Dashboard
Configuration
JSON
Customize
Config
reference

Core Configuration

INX-MQTT uses a JSON standard format as a config file. If you are unsure about JSON syntax, you can find more information in the official JSON specs.

You can change the path of the config file by using the -c or --config argument while executing inx-mqtt executable.

For example:

inx-mqtt -c config_defaults.json

You can always get the most up-to-date description of the config parameters by running:

inx-mqtt -h --full

1. Application

Name Description Type Default value
checkForUpdates Whether to check for updates of the application or not boolean true
shutdown Configuration for shutdown object

Shutdown

Name Description Type Default value
stopGracePeriod The maximum time to wait for background processes to finish during shutdown before terminating the app string "5m"
log Configuration for log object

Log

Name Description Type Default value
enabled Whether to store self-shutdown events to a log file boolean true
filePath The file path to the self-shutdown log string "shutdown.log"

Example:

  {
    "app": {
      "checkForUpdates": true,
      "shutdown": {
        "stopGracePeriod": "5m",
        "log": {
          "enabled": true,
          "filePath": "shutdown.log"
        }
      }
    }
  }

2. Logger

Name Description Type Default value
name The optional name of the logger instance. All log messages are prefixed with that name. string ""
level The minimum enabled logging level string "info"
timeFormat Sets the logger's timestamp format. (options: "rfc3339", "rfc3339nano", "datetime", "timeonly", and "iso8601") string "rfc3339"
outputPaths A list of file paths or stdout/stderr to write logging output to array stdout

Example:

  {
    "logger": {
      "name": "",
      "level": "info",
      "timeFormat": "rfc3339",
      "outputPaths": [
        "stdout"
      ]
    }
  }

3. INX

Name Description Type Default value
address The INX address to which to connect to string "localhost:9029"
maxConnectionAttempts The amount of times the connection to INX will be attempted before it fails (1 attempt per second) uint 30
targetNetworkName The network name on which the node should operate on (optional) string ""

Example:

  {
    "inx": {
      "address": "localhost:9029",
      "maxConnectionAttempts": 30,
      "targetNetworkName": ""
    }
  }

4. MQTT

Name Description Type Default value
websocket Configuration for websocket object
tcp Configuration for TCP object
auth Configuration for auth object
publicTopics The MQTT topics which can be subscribed to without authorization. Wildcards using * are allowed array commitments/*
blocks*
transactions/*
block-metadata/*
transaction-metadata/*
outputs/*
protectedTopics The MQTT topics which only can be subscribed to with valid authorization. Wildcards using * are allowed array
subscriptions Configuration for subscriptions object
maximumClientWritesPending The maximum number of pending message writes for a client int 8192
clientWriteBufferSize The size of the client write buffer int 2048
clientReadBufferSize The size of the client read buffer int 2048

Websocket

Name Description Type Default value
enabled Whether to enable the websocket connection of the MQTT broker boolean true
bindAddress The websocket bind address on which the MQTT broker listens on string "localhost:1888"
advertiseAddress The address of the websocket of the MQTT broker which is advertised to the INX Server (optional). string ""

TCP

Name Description Type Default value
enabled Whether to enable the TCP connection of the MQTT broker boolean false
bindAddress The TCP bind address on which the MQTT broker listens on string "localhost:1883"
tls Configuration for TLS object

TLS

Name Description Type Default value
enabled Whether to enable TLS for TCP connections boolean false
privateKeyPath The path to the private key file (x509 PEM) for TCP connections with TLS string "private_key.pem"
certificatePath The path to the certificate file (x509 PEM) for TCP connections with TLS string "certificate.pem"

Auth

Name Description Type Default value
passwordSalt The auth salt used for hashing the passwords of the users string "0000000000000000000000000000000000000000000000000000000000000000"
users The list of allowed users with their password+salt as a scrypt hash object []

Subscriptions

Name Description Type Default value
maxTopicSubscriptionsPerClient The maximum number of topic subscriptions per client before the client gets dropped (DOS protection) int 1000
topicsCleanupThresholdCount The number of deleted topics that trigger a garbage collection of the subscription manager int 10000
topicsCleanupThresholdRatio The ratio of subscribed topics to deleted topics that trigger a garbage collection of the subscription manager float 1.0

Example:

  {
    "mqtt": {
      "websocket": {
        "enabled": true,
        "bindAddress": "localhost:1888",
        "advertiseAddress": ""
      },
      "tcp": {
        "enabled": false,
        "bindAddress": "localhost:1883",
        "tls": {
          "enabled": false,
          "privateKeyPath": "private_key.pem",
          "certificatePath": "certificate.pem"
        }
      },
      "auth": {
        "passwordSalt": "0000000000000000000000000000000000000000000000000000000000000000",
        "users": null
      },
      "publicTopics": [
        "commitments/*",
        "blocks*",
        "transactions/*",
        "block-metadata/*",
        "transaction-metadata/*",
        "outputs/*"
      ],
      "protectedTopics": [],
      "subscriptions": {
        "maxTopicSubscriptionsPerClient": 1000,
        "topicsCleanupThresholdCount": 10000,
        "topicsCleanupThresholdRatio": 1
      },
      "maximumClientWritesPending": 8192,
      "clientWriteBufferSize": 2048,
      "clientReadBufferSize": 2048
    }
  }

5. Profiling

Name Description Type Default value
enabled Whether the profiling component is enabled boolean false
bindAddress The bind address on which the profiler listens on string "localhost:6060"

Example:

  {
    "profiling": {
      "enabled": false,
      "bindAddress": "localhost:6060"
    }
  }

6. Prometheus

Name Description Type Default value
enabled Whether the prometheus plugin is enabled boolean false
bindAddress The bind address on which the Prometheus HTTP server listens on string "localhost:9312"
mqttMetrics Whether to include MQTT metrics boolean true
goMetrics Whether to include go metrics boolean false
processMetrics Whether to include process metrics boolean false
promhttpMetrics Whether to include promhttp metrics boolean false

Example:

  {
    "prometheus": {
      "enabled": false,
      "bindAddress": "localhost:9312",
      "mqttMetrics": true,
      "goMetrics": false,
      "processMetrics": false,
      "promhttpMetrics": false
    }
  }