modalityd Configuration File
Summary
The Modality daemon, modalityd, can be configured either with command line arguments or through a configuration file. By default modalityd looks for a configuration file at /etc/modalityd/config.toml
. You can provide a different location for modalityd to find its configuration file with the MODALITYD_CONFIG
environment variable.
The modalityd configuration file can specify:
- The address(es) at which modalityd's HTTP API will be available. This API is used by the CLI.
- The address(es) at which modalityd listens for incoming data.
- The directory where modalityd stores its databases.
- The license key.
- TLS certificate and key for secure HTTPS connections.
- Whether to allow insecure connections.
modalityd Configuration File Fields
api-addr |
modalityd's APIs (used by the modality CLI) will be available at this socket over HTTP. Defaults to '127.0.0.1:14181' . Can be overridden with the --api-addr command line option. |
api-addr-tls |
modalityd's APIs (used by the modality CLI) will be available at this socket over HTTPS. Only enabled if you provide both tls-cert and tls-key . Defaults to '127.0.0.1:14183' . Can be overridden with the --api-addr-tls command line option. |
connect-addr |
Socket on which modalityd listens for incoming data, either from a reflector or directly from a system that implements modalityd's data collection protocol. This is the socket for insecure connections. Defaults to '127.0.0.1:14182' . Can be overridden with the --connect-addr option. |
connect-addr-tls |
Socket on which modalityd listens for incoming data, either from a reflector or directly from a system that implements modalityd's data collection protocol. This is the socket for secure connections using TLS encryption. Only enabled if you provide both tls-cert and tls-key . Defaults to '127.0.0.1:14184' . Can be overridden with the --connect-addr-tls option. |
mutation-connect-addr |
Socket for insecure connections for the Deviant mutation protocol (coming soon). This socket must be available to modalityd, even if you are only running Modality. Defaults to '127.0.0.1:14192' . Can be overridden with the --mutation-connect-addr command line option. |
mutation-connect-addr-tls |
Socket for secure connections using TLS encryption for the Deviant mutation protocol (coming soon). This socket must be available to modalityd, even if you are only running Modality. Only enabled if you provide both tls-cert and tls-key . Defaults to '127.0.0.1:14193' . Can be overridden with the --mutation-connect-addr-tls command line option. |
data-dir |
Directory where modalityd stores its databases. Defaults to /var/lib/modality . Can be overridden with the --data-dir option. |
license-key |
License key. Can be provided in this configuration file or overridden with the --license-key option or the MODALITY_LICENSE_KEY environment variable. |
tls-cert |
The certificate chain file to use for TLS connections. Must be in either PKCS#12 or PEM format. |
tls-key |
The private key file to use for TLS connections. Must be in either PKCS#12 or PEM format. |
disable-plaintext-protocols |
Set to true to only allow modalityd to listen on secure connections. Note that both tls-cert and tls-key must be provided for secure TLS connections to function. |
strict-index-consistency |
By default, modalityd runs in fast index consistency mode. In exchange for better indexing performance, this allows modalityd to leave some data unindexed if the process is abnormally terminated under heavy write load. If your use case requires absolute certainty that the index is consistent with the stored even data under crash conditions, you can use the --strict-index-consistency flag. When strict mode is enabled, modalityd may take a significant amount of time to start up after an abnormal termination event (even when not under write load), as it verifies and recreates the needed indices. |
Example modalityd Configuration File
modalityd Configuration File Locations
By default modalityd looks for its configuration file at /etc/modalityd/config.toml
. You can specify a different config file location with the MODALITYD_CONFIG
environment variable.