Skip to main content
Version: 5.0.0

N|Solid Runtime Configuration

Environment Variables

The N|Solid runtime can be configured via the environment variables listed below. Although each of these environment variables are optional, certain features will be missing or limited in each case. It is recommended that you connect to the console using NSOLID_COMMAND or a StatsD collector using NSOLID_STATSD, and customize your process using any of the remaining environment variables.

Environment VariableDescription
NSOLID_COMMANDThe route to the console command port. It should be formatted as "host:port". The default host is localhost, and the default port is 9001. Without this environment variable, the N|Solid Agent will not attempt to connect.

The host can be provided via several formats:
   IPv4 10.0.0.21
   IPv6 [2001:cdba::3257:9652]
   hostname nsolid_hub.local
NSOLID_APPNAMEThe name of the application that the instance is running. Use this in order to create logical groupings of the processes in the console. If omitted, the value defaults to the name field of your package.json. If this is also omitted, the value defaults to untitled application
NSOLID_TAGSThe list of tags associated with your instance, which can be used to identify and filter instances in Console views. See Tags and Filters for more details
NSOLID_PUBKEYThe ZMQ public key used with the N|Solid Console server
NSOLID_HOSTNAMEThe hostname the N|Solid process is running on (overrides system-determined hostname)
NSOLID_STATSDThe route to a StatsD collector if you wish to send metrics directly to an external data collection service from the N|Solid process. Without this environment variable, the N|Solid Agent will not attempt to send StatsD data.

It should be formatted as "host:port". If unspecified, the default host is localhost and port is 8125. Hosts and IP addresses are accepted in the same format as NSOLID_COMMAND
NSOLID_INTERVALThe interval, in milliseconds, in which the N|Solid Agent will collect and report metrics to the console and/or the StatsD collector if either are connected. This value defaults to 3000 (3 seconds) and cannot be lower than 1000
NSOLID_OTLPIt defines the type of OTLP endpoint we want N
NSOLID_OTLP_CONFIGSpecific configuration for the OTLP endpoint tye defined with NSOLID_OTLP. See the OpenTelemetry section for more details
NSOLID_STATSD_BUCKETAn override for the default StatsD bucket (key prefix) when using the NSOLID_STATSD functionality. See the StatsD section for more details
NSOLID_STATSD_TAGSOptional tags to append to StatsD metric data when using the NSOLID_STATSD functionality. See the StatsD section for more details
NSOLID_TRACING_ENABLEDBoolean to indicate if you want N|Solid to generate traces when connected to an endpoint that supports it. See the Tracing section for more details
NSOLID_TRACING_MODULES_BLACKLISTList of core modules instrumented by N|Solid you want to disable when tracing is enabled. See the Tracing section for more details
NSOLID_REDACT_SNAPSHOTSBoolean to indicate if you want heap snapshots to obscure string variable contents. This may impede your ability to debug and is meant for sensitive production environments.

package.json

The N|Solid process can also be configured via an nsolid object in the package.json file for the current application. Environment variable values override the properties in the package.json file. The mapping of nsolid object properties in the package.json file to environment variables is as follows:

nsolid property in package.jsonEnvironment Variable
commandNSOLID_COMMAND
pubkeyNSOLID_PUBKEY
statsdNSOLID_STATSD
statsdBucketNSOLID_STATSD_BUCKET
statsdTagsNSOLID_STATSD_TAGS
otlpNSOLID_OTLP
otlpConfigNSOLID_OTLP_CONFIG
tracingEnabledNSOLID_TRACING_ENABLED
tracingModulesBlacklistNSOLID_TRACING_MODULES_BLACKLIST
hostnameNSOLID_HOSTNAME
envNODE_ENV
intervalNSOLID_INTERVAL
tagsNSOLID_TAGS - this may be an array of tag values or a comma-separated string of tag values
appNSOLID_APPNAME

Example package.json:

# package.json

{
"name": "message-service",
"version": "1.0.0",
"nsolid": {
"env": "production",
"command": "nsolid-command-host.local:9001",
"app": "messaging",
"tags": "aws, mq"
}
}

N|Solid CLI

Configuration File

The N|Solid Command Line Interface (CLI) can be configured via a configuration file, .nsolid-clirc.

# .nsolid-clirc

{
"remote": "http://localhost:6753",
"app": "my-node-application"
}