Configuration

This topic show how to customize the configuration, troubleshoot and debug ingrid if you run into issues.

Service configuration

Every ingrid service contains following service configuration parameters:

Parameter Default Description
Name UniqueID() Name of this service
Tags "" Tags used as additional meta information (separated by comma)
ServerTLS false Enable TLS to connect to the hive
ServerRootCA "" The server root ca used to connect to the hive
ServerURL "" The server url used to connect to the hive
ServerHost "" The server host used to connect to the hive
ServerAuth "" The server auth used to connect to the hive
ServerKeyFile "" Path to the NKey file to connect to the hive
LogLevel "" The log level used for logging. Available log levels: info, warn, error, debug, trace, fatal, panic
LogFormat "text/default" The log format used for logging. Available formats: text/default, text/plain, text/keyvalue, application/json
LogSensitive false If set to true, sensitive logs will be written
Metrics true Enable gathering metrics
MetricsResponseChannel "metrics_response" Metrics response channel to publish metrics to
MetricsRequestChannel "metrics_request" Metrics request channel to listen to
MetricsInterval 60 Metrics cumulate interval
MetricsPoints 10 Keep this amount of metrics measure points
LargeDataIP "" IP Address of this Module (leave empty for auto detect)
LargeDataPort "" Port to use for LargeData (leave empty for default port 7632)
LargeDataPath "" Temp Directory to Store LargeData Files into (leave empty for os Default Temp Directory)
LargeDataEnabled true Set to false, to disable LargeData processing

Input configuration

Services like from type entrypoint can act as an input service. Following configuration parameters are available:

Parameter Default Description
InputChannel "" Channel to be used as input
InputQueue "*" Channel to be used as input queue of the input channel

Output configuration

Services like from type worker can act as an output service. Following configuration parameters are available:

Parameter Default Description
OutputChannel "" Channel to be used as output

Configure a ingrid service

The core idea and approach is to store the configurations in environment variables (support the twelve-factor app methodology). But you can still configure every service over the cli or a configuration file. Order of precendence:

  • Command line options
  • Environment variables
  • Configuration file
  • Default values

Example via Command line options:

$ ./moduleExample -ServerURL "key@server" -InputChannel "example"

Example via Environment variables:

$ export SERVERURL=key@server
$ export INPUTCHANNEL=example
$ ./moduleExample

Example via Configuration file:

$ cat moduleExample.conf
# empty newlines and lines beginning with a "#" character are ignored.
ServerURL=key@server

InputChannel=example

$ ./moduleExample -config moduleExample.conf

Using file://

Every configuration parameter can be loaded via file if you set the prefix file://{path_to_file}. Useful for secrets.

Using hive://

All parameters that specify a file can also be loaded via the hive by setting the prefix hive://{path_to_file}.

Using docker

If you are using docker, you can still use all the same configuration options. Following example shows via the Command line options:

$ docker run registry.goingrid.io/{type}/{name}:latest -ServerURL "key@server" -InputChannel "example"

Additional configuration files

Some services have additional configuration files. All of them are formatted as JSON and can be retrieved either from the local filesystem or over the hive.

Help

You can get all service configruation properties by execute the following command

docker run registry.goingrid.io/{type}/{name} --help

Troubleshoot a ingrid module

You can enable debugging on the ingrid module by setting the configuration parameter to logLevel=debug. As soon as you restart the service, you should immediately see more output.