Skip to main content
Version: 6.x (latest)

Using the N|Solid CLI

The N|Solid Runtime ships with nsolid-cli, a command-line tool that talks to the N|Solid Console's API. Use it to script and automate tasks you would otherwise perform in the N|Solid Console, such as listing processes, collecting CPU profiles and heap snapshots, and exporting settings.

info

To use nsolid-cli with N|Solid SaaS, contact NodeSource support to enable this feature and get a secure access token for your Console's API endpoint.

Options​

nsolid-cli mirrors the Console's API schema: when it starts, it downloads the schema from the Console and maps each command to an API endpoint. This page documents the most common commands. For commands not documented here, see your Console's API documentation at http://localhost:6753/api/v4/api-docs (replace localhost:6753 with your Console's address).

To see the built-in help, use the -h option:

nsolid-cli -h

Unless otherwise noted, nsolid-cli outputs line-delimited JSON (each object is followed by a newline, \n). The examples on this page are expanded for readability.

Global options​

OptionDescription
--remote=ADDRESSAddress of the N|Solid Console API. Defaults to http://localhost:6753/api/. If you leave them out, http:// and the /api/ path are added automatically.
--auth=TOKENAccess token for a Console with authentication enabled. Sent as an Authorization: Bearer header. See Authentication.
--timeout=TIMEOUTHow long to wait for a response. The value is passed to the HTTP client as milliseconds.
--id=IDThe agent ID (or, for asset commands, the asset ID) to run the command on.
--threadId=THREADIDThe worker thread to target. Defaults to the main thread (0).
--deleteUse the HTTP DELETE method, for example to delete an asset.
--body=BODYSend BODY with a PUT or POST command.
--attach=FILELike --body, but reads the content from a file. Used by import-settings.
-s, --stdinSend standard input as the body of a PUT or POST command. Overrides --body.
-v, --versionPrint the version of nsolid-cli.
-h, --helpPrint the help text.

Each command also accepts the options listed in its section below.

Configuration file​

You can store any option in a .nsolid-clirc file in INI format in your home directory (~/.nsolid-clirc, or %USERPROFILE%\.nsolid-clirc on Windows). Values in the file take precedence over the same options on the command line.

remote = https://console.example.com
auth = <your-admin-token>

Authentication​

If your Console has authentication enabled, configure an administrative access token so nsolid-cli can access it. Set the token to a secure value with the NSOLID_CONSOLE_AUTH_ADMIN_TOKEN environment variable, or with adminToken in the [auth] section of the Console configuration file. Then pass the same value to nsolid-cli with the --auth option.

nsolid-cli --remote=https://<your-console-host> --auth="<your-admin-token>" summary

Date and time values​

For commands that take --start and --end options, you can use these formats:

FormatDescription
milliseconds since epochThe value returned by Date.now()
yyyy-mm-ddThh:mm:ssISO date
-NsN seconds ago
-NmN minutes ago
-NhN hours ago
-NdN days ago
0Now, when used with --end

Query filters​

Some commands take a --q option followed by a query filter expression. Only results that match all filter terms are returned.

A filter term is a string with no spaces between its parts:

field+operator+value

The field can be any field from info or metrics, or vulns, vuln, or package. See the output of those commands for the available fields.

The operators for each field type are described below.

The value can be a single value or a list of values separated by ,. The term is true if the field and operator match any of the values. You can escape any character by preceding it with %. In practice, only %, space, and , need escaping.

A query filter expression is a list of filter terms separated by spaces.

This example passes the list command a query filter expression with two terms:

nsolid-cli list --q "vulns>=2 package=express"

String operators

OperatorDescription
=True if the field value is equal to any value in the expression
!=True if the field value is not equal to any value in the expression
~True if the field value wildcard-matches any value in the expression
!~True if the field value does not wildcard-match any value in the expression

You can specify multiple string values in the expression, separated by commas.

Number operators

OperatorDescription
<True if the field value is less than the value in the expression
<=True if the field value is less than or equal to the value in the expression
>True if the field value is greater than the value in the expression
>=True if the field value is greater than or equal to the value in the expression

Package operators

OperatorDescription
=True if the field value equals the value in the expression
!=True if the field value does not equal the value in the expression
<True if the field value is less than the value in the expression
<=True if the field value is less than or equal to the value in the expression
>True if the field value is greater than the value in the expression
>=True if the field value is greater than or equal to the value in the expression

A value for package fields is either a package name or {package name}@{simple-semver-range}, where a simple semver range is one of:

Semver ranges

TypeExamples
X-ranges1.2.3, 1.2, 1.2.x, 1.x, 1.2.*, etc.
Tilde ranges~1.2.3, ~1.2, etc.
Caret ranges^1.2.3, ^1.2, etc.

The < and > operators do a semver range check comparing the versions.

asset​

Downloads an asset.

OptionDescription
--idThe asset ID (required)
--deleteDelete the asset instead of downloading it. The asset is removed in the Console's next cleanup phase.

Usage

nsolid-cli asset --id 217040c0-02d1-4956-8648-7fb84b78c65e > my.heapsnapshot
nsolid-cli asset --delete --id 217040c0-02d1-4956-8648-7fb84b78c65e

Asset IDs are available from the assets command. The asset file is written to stdout. nsolid-cli decompresses the asset automatically if it's compressed.

assets​

Lists the assets (CPU profiles, heap profiles, heap samples, and heap snapshots) that are available for download.

OptionDescription
--idThe agent ID or agent ID prefix
--appThe NSOLID_APP value
--hostnameThe host the process is running on
--tagsAn NSOLID_TAGS value
--typeOne of profile, snapshot, snapshot-summary, heap-profile, or heap-sample, to limit the type of asset returned
--startReturn assets created after the specified time
--endReturn assets created before the specified time
--starredReturn only assets that have been starred
--visualizationFilter CPU profiles by default visualization type: flamegraph, sunburst, or treemap

Usage

nsolid-cli assets --app my-app-name --type snapshot

Returns a JSON stream including the following properties:

PropertyDescription
threadIdThe integer ID of the thread. 0 is the main thread.
timeThe timestamp of asset completion
assetAn asset ID to use with the asset command
typeprofile, snapshot, snapshot-summary, heap-profile, or heap-sample
idThe agent ID
reasonHow the asset was triggered, for example User for a manual collection
appThe NSOLID_APP value
hostnameThe host the process is running on
tagsThe NSOLID_TAGS values
durationThe duration of the profile contents, in milliseconds
sizeThe size of the asset, in bytes
compressedWhether the asset is served gzip-compressed
deleteSoonWhether the asset is scheduled to be deleted soon by automated housekeeping
pidThe operating system process ID
titleThe process title
infoThe process info
metricsThe process metrics nearest the time of collection
visualizationThe type of visualization, for example flamegraph
sourceMapWhether there is a source map for this profile
starredWhether the asset is starred

Example JSON result​

{
"threadId": 0,
"time": "2024-05-29T16:37:19.378Z",
"asset": "abdbde9c-bcf8-4e62-98cb-b81a076bd5ec",
"type": "profile",
"id": "e722dbdab1744400e7acfeafba9e86001b9da5b6",
"reason": "User",
"app": "webserver",
"hostname": "my-host",
"tags": [],
"duration": 5029,
"size": 0,
"compressed": true,
"deleteSoon": 0,
"pid": 5296,
"title": "nsolid",
"info": { ... },
"metrics": { ... },
"visualization": "flamegraph",
"sourceMap": false,
"starred": false
}

assets-in-progress​

Lists the assets that are still being generated.

Usage

nsolid-cli assets-in-progress

Example JSON result​

{
"assetsInProgress": [ "abdbde9c-bcf8-4e62-98cb-b81a076bd5ec" ],
"snapdiffInProgress": []
}

When an asset ID no longer appears in assetsInProgress, the asset is ready to download with the asset command.

custom​

Invokes a custom command. For more information on custom commands, see the how-to guide.

note

Custom commands only work with processes connected over ZeroMQ (NSOLID_COMMAND). They aren't available for processes connected with NSOLID_GRPC or NSOLID_SAAS.

OptionDescription
--idThe agent ID or ID prefix (required)
--nameThe name of the custom command (required)
--dataData to send with the command

Usage

# calls the nsolid.on('verbose', fn) handler in your application, if present
nsolid-cli custom --id=<agent-id> --name=verbose --data=off

Returns a JSON object with the following properties:

PropertyDescription
resultThe result of the custom command: the value your handler passed to request.return() (or request.throw())
timeThe timestamp recorded for the event
idThe agent ID
appThe NSOLID_APP value
hostnameThe host the process is running on
tagsThe NSOLID_TAGS values

Example JSON result​

{
"result": {
"ok": true
},
"id": "5bc4a84c62710b007f4ed6f96d00570079c60920",
"app": "example",
"hostname": "my-host",
"tags": [],
"time": 1717010944178
}

events​

Subscribes to the event stream, which emits a wide range of event types and metadata.

Usage

nsolid-cli events

There are many types of events, and more are added over time. Some of the primary types are:

Event typeDescription
license-updatedThe license data was changed or verified with the license server
field-range-changedThe range or option set for a field expanded or contracted
agent-packages-addedAn agent's package list was added or updated
agent-foundA new agent connected to the Console
agent-exitAn agent terminated

Example JSON result​

{"time":"2024-05-29T19:41:12.389Z","event":"field-range-changed","args":{"domain":"metrics","name":"cpuPercent","range":[0,110]}}
{"time":"2024-05-29T19:41:12.389Z","event":"field-range-changed","args":{"domain":"metrics","name":"heapTotal","range":[0,1300000000]}}
{"time":"2024-05-29T19:41:12.389Z","event":"field-range-changed","args":{"domain":"metrics","name":"loopEstimatedLag","range":[0,4000]}}

events-historic​

Retrieves the events from a time range in the past.

OptionDescription
--idAn agent ID
--appThe NSOLID_APP value
--hostnameThe host the process is running on
--typeAn event type to include
--startReturn events that occurred after the specified time
--endReturn events that occurred before the specified time
--pageA page number (events are paginated if you provide this option)
--showLimitThe number of records per page
--orderByA field to order the events by (such as agentId or hostname)
--orderThe sort order: asc or desc

Usage

nsolid-cli events-historic --start="-2h" --end="-1h"

generate-keypair​

Returns a randomly generated key pair for the N|Solid Console's ZeroMQ socket configuration. If your N|Solid Console runs on an untrusted network, generate and use new keys.

Usage

nsolid-cli generate-keypair

Returns a JSON object with the following properties:

PropertyDescription
publicPublic key value. publicKey in the N|Solid Console configuration, and the NSOLID_PUBKEY environment variable for the N|Solid Runtime
privatePrivate key value. privateKey in the N|Solid Console configuration

Example JSON result​

{
"public": "[t&m}{EZH7=HR(IW:+Ttk:=r.Y$:CP+-Q&5L?2N!",
"private": "4QZof={^Pman?I?mB0o!]%z/{Jlu6:mJfl[Ms@[^"
}

heap-sampling​

Collects a sampling heap profile of the specified process.

OptionDescription
--idThe agent ID (required)
--durationDuration of the sampling, in seconds. Default is 5 seconds.
--sampleIntervalSampling interval, in bytes. Default is 524288 (512 KB).
--stackDepthMaximum stack depth to record for each sampled allocation. Default is 16.
--threadIdThe worker thread to sample. Default is the main thread (0).

Usage

nsolid-cli heap-sampling --id=<agent-id> --duration=30

When the sampling finishes, the command returns a JSON object whose asset property is the asset ID. Download the file with nsolid-cli asset --id=<asset-id> > my.heapprofile.

info​

Returns objects with static information about processes and the hosts they run on.

OptionDescription
--idThe full or partial agent ID
--qA query filter expression (see Query filters)

Usage

nsolid-cli info

Returns a JSON stream including the following properties:

PropertyDescription
timeTime the message was sent (ISO 8601 timestamp)
idThe agent ID
appThe NSOLID_APP value or name property from package.json
appVersionThe version property from package.json
hostnameThe host the process is running on
tagsThe NSOLID_TAGS values
pidOperating system process ID
processStartThe time the process started
execPathPath of the executable running the application
mainThe main module used when the application started
nodeEnvThe NODE_ENV value
archThe CPU architecture
platformThe operating system platform
kernelVersionThe Linux kernel version encoded as a number (0 on other platforms)
totalMemTotal memory of the host, in bytes
cpuCoresThe number of CPU cores
cpuModelThe CPU model
versionsObject with the versions of the components used in the runtime

See Metrics in detail for more about each field.

Example JSON result​

{
"app": "webserver",
"appVersion": "1.4.0",
"arch": "x64",
"cpuCores": 4,
"cpuModel": "Intel(R) Xeon(R) Platinum 8488C",
"execPath": "/usr/bin/nsolid",
"hostname": "webserver-7d58498dc9-8z6km",
"id": "44c58a6b7c607c00d58fc184f6dab60080d16cd4",
"kernelVersion": 394240,
"main": "/usr/src/app/webserver",
"nodeEnv": "production",
"pid": 7,
"platform": "linux",
"processStart": 1716993070545,
"tags": [],
"totalMem": 16467304448,
"versions": { ... },
"time": "2024-05-29T14:31:10.545Z"
}

list​

Returns all matching N|Solid processes, with their most recent info and metrics data. ls is an alias for this command.

OptionDescription
--qA query filter expression (see Query filters)

Usage

nsolid-cli list --q id=5dd6

Returns newline-delimited JSON objects. Each row includes the following properties:

PropertyDescription
timeThe timestamp of the last metrics payload
infoThe object returned by the info command
metricsThe object returned by the metrics command

Example JSON result​

{
"time": "2024-05-29T19:46:46.103Z",
"info": {
"time": "2024-05-29T19:46:46.103Z",
"id": "44c58a6b7c607c00d58fc184f6dab60080d16cd4",
"app": "webserver",
"hostname": "webserver-7d58498dc9-8z6km",
"tags": [],
"appVersion": "1.4.0",
"arch": "x64",
"cpuCores": 4,
"cpuModel": "Intel(R) Xeon(R) Platinum 8488C",
"execPath": "/usr/bin/nsolid",
"main": "/usr/src/app/webserver",
"nodeEnv": "production",
"pid": 7,
"platform": "linux",
"processStart": 1716993070545,
"totalMem": 16467304448,
"versions": { ... }
},
"metrics": { ... }
}

metrics​

Subscribes to the metrics of a set of agents.

OptionDescription
--fieldA field to include in the output. If not specified, all fields are returned. nsolid-cli sends only one --field value correctly; to select several fields, call the Console API directly with repeated field= query parameters.
--intervalHow often to return metrics data, in seconds by default. You can add a unit suffix: ms, s, m, h, d, or w.
--qA query filter expression (see Query filters)

Usage

nsolid-cli metrics

See Metrics in detail for a description of every metric.

Example JSON result​

{"time":"2024-05-29T19:48:37.249Z","id":"44c58a6b7c607c00d58fc184f6dab60080d16cd4","app":"webserver","hostname":"webserver-7d58498dc9-8z6km","tags":[],"activeHandles":8,"activeRequests":0,"blockInputOpCount":18344,"blockOutputOpCount":86448,"cpu":1.0176217699999999,"cpuPercent":101.762177,"cpuSystemPercent":2.803665,"cpuUserPercent":98.958512,"ctxSwitchInvoluntaryCount":390983,"ctxSwitchVoluntaryCount":4070346,"delay":8768639.573029,"dns99Ptile":0,"dnsCount":496,"dnsMedian":0,"eventsProcessed":7202045,"eventsWaiting":7184302,"externalMem":67914068,"freeMem":9133502464,"fsHandlesClosedCount":6,"fsHandlesOpenedCount":6,"gcCount":381851,"gcDurUs99Ptile":13605,"gcDurUsMedian":1485,"gcForcedCount":0,"gcFullCount":0,"gcMajorCount":3030,"heapSizeLimit":2197815296,"heapTotal":1149370368,"heapUsed":1102212104,"httpClient99Ptile":0,"httpClientAbortCount":0,"httpClientCount":3045,"httpClientMedian":0,"httpConnections":5,"httpServer99Ptile":0,"httpServerAbortCount":1,"httpServerCount":43,"httpServerMedian":0,"ipcReceivedCount":0,"ipcSentCount":0,"load15m":1.31,"load1m":0.83,"load5m":1.27,"loopAvgTasks":0,"loopEstimatedLag":6842.682142,"loopIdlePercent":0,"loopIdleTime":9693339671845,"loopIterWithEvents":7180420,"loopIterations":7254748,"loopTotalCount":7254748,"loopUtilization":1,"mallocedMemory":1081456,"numberOfDetachedContexts":0,"numberOfNativeContexts":1,"pageFaultHardCount":8,"pageFaultSoftCount":124529579,"peakMallocedMemory":37345928,"pipeServerCreatedCount":0,"pipeServerDestroyedCount":0,"pipeSocketCreatedCount":2,"pipeSocketDestroyedCount":0,"processingDelay":22285260577,"promiseCreatedCount":0,"promiseResolvedCount":0,"providerDelay":8746354312452,"res15m":0.712438,"res1m":0.746145,"res5m":0.720961,"res5s":1.022003,"rss":1424875520,"signalCount":0,"swapCount":0,"systemUptime":8234722,"tcpServerCreatedCount":1,"tcpServerDestroyedCount":0,"tcpSocketCreatedCount":499,"tcpSocketDestroyedCount":494,"threadId":0,"threadName":"","threads":[1,2,0],"threadsName":{"0":"","1":"","2":""},"timestamp":1717012116412,"title":"webserver","totalAvailableSize":1076845368,"totalHeapSizeExecutable":4612096,"totalPhysicalSize":1149161472,"udpSocketCreatedCount":0,"udpSocketDestroyedCount":0,"uptime":19045,"user":"ns","vulns":17}

metrics-historic​

Retrieves metrics records over a past time range. Records match the metrics command output.

OptionDescription
--fieldA field to include in the output. If not specified, all fields are returned. nsolid-cli sends only one --field value correctly; to select several fields, call the Console API directly with repeated field= query parameters.
--qA query filter expression (see Query filters)
--startThe start of the time range
--endThe end of the time range
--seriesThe aggregation level of the data: raw, 1m, or 1h. Defaults to raw.
--threadsListComma-separated list of thread IDs to include. Defaults to the main thread (0).

Usage

nsolid-cli metrics-historic --start="-2m" --end="-1m"

packages​

Returns the packages and modules available in the specified process.

OptionDescription
--idThe full agent ID or prefix (required)
--modeflat for a simple list of packages, or tree for the dependency hierarchy
--filterTypesComma-separated dependency types to include: prod, dev, peer, or optional
--moduleNameShow only the package with this name, for example express
--pageA page number, to paginate the results
--showLimitThe number of records per page

Usage

nsolid-cli packages --id=<agent-id>

Returns a JSON object with the following properties:

PropertyDescription
idThe agent ID
timeThe timestamp of the message
appThe NSOLID_APP value
packagesAn array of package objects with details about each package and its dependencies
vulnerabilitiesAn object with vulnerability details

profile​

Generates a V8 CPU profile of the specified process and writes it to stdout when it's done.

OptionDescription
--idThe agent ID (required)
--durationDuration of the profile, in seconds. Default is 5 seconds.
--threadIdThe worker thread to profile. Default is the main thread (0).

Usage

nsolid-cli profile --id=<agent-id> --duration=10 > my.cpuprofile

After the profile file is created, you can open it in the Chrome DevTools Performance panel.

tip

To load the file, Chrome requires the .cpuprofile file extension.

reconfigure​

Reads or changes the dynamic configuration of running processes (N|Solid 4.7.0 and later).

To read a process's current configuration, pass its agent ID:

OptionDescription
--idThe agent ID, or an application name (required)
nsolid-cli reconfigure --id=<agent-id>

To change the configuration, pass a JSON object of settings with --body and select the processes with --q. Supported settings include interval, blockedLoopThreshold, pauseMetrics, promiseTracking, tracingEnabled, tracingModulesBlacklist, assetsEnabled, contCpuProfile, redactSnapshots, tags, statsd, statsdBucket, and statsdTags. contCpuProfile applies only to processes connected over gRPC (NSOLID_GRPC or NSOLID_SAAS). tracingModulesBlacklist takes the numeric bitmask (1 = dns, 12 = http), not module names.

nsolid-cli reconfigure --q "id=<agent-id>" --body '{"tracingEnabled": true}'
warning

When you change the configuration, the --q expression selects the processes to reconfigure. Without --q, the change applies to every connected process.

snapshot​

Generates a V8 heap snapshot of the specified process and writes it to stdout when it's done.

OptionDescription
--idThe agent ID (required)
--threadIdThe worker thread to snapshot. Default is the main thread (0).

Usage

nsolid-cli snapshot --id=<agent-id> > my.heapsnapshot

After the snapshot file is created, you can open it in the Memory panel of Chrome DevTools.

tip

To load the file, Chrome requires the .heapsnapshot file extension.

startup-times​

Lists the time the process took to reach each startup phase, from initial process execution.

OptionDescription
--idThe full agent ID or prefix (required)

Usage

nsolid-cli startup-times --id=<agent-id>

Returns a JSON object with the recorded startup times. See nsolid.startupTimes() in the JS API for the meaning of each phase and how to add your own.

Example JSON result​

{
"bootstrap_complete": [0, 16133046],
"initialized_node": [0, 348150],
"initialized_v8": [0, 2948542],
"loaded_environment": [0, 7952192],
"loop_start": [0, 28983685],
"timeOrigin": [0, 0],
"id": "01476b6496aa530063f92c5e4c5da800cf5685ae",
"time": "2024-05-29T19:59:29.974Z",
"tags": [],
"app": "example",
"hostname": "my-host"
}

track-heap-objects​

Collects a heap profile of the specified process, optionally with allocation stack traces.

OptionDescription
--idThe agent ID (required)
--durationDuration of the profile, in seconds. Default is 5 seconds.
--trackAllocationstrue to include allocation stack traces. Default is false.
--threadIdThe worker thread to profile. Default is the main thread (0).

Usage

nsolid-cli track-heap-objects --id=<agent-id> --duration=30 --trackAllocations=true

When the profile finishes, the command returns a JSON object whose asset property is the asset ID. Download the file with nsolid-cli asset --id=<asset-id> > my.heapprofile.

vulnerabilities​

Returns known security vulnerabilities for all processes.

OptionDescription
--idAn agent ID
--appThe NSOLID_APP value
--hostnameThe host the process is running on
--tagsAn NSOLID_TAGS value
--typeOne or more vulnerability IDs to include, separated by | (for example GHSA-36jr-mh4h-2g58)
--pageA page number, to paginate the results
--showLimitThe number of records per page

Usage

nsolid-cli vulnerabilities

Returns a JSON object with all currently known vulnerabilities.

PropertyDescription
timeMessage timestamp
lastUpdatedWhen the vulnerability data was last updated
vulnerabilitiesAn array of vulnerability objects
vulnerabilityCountThe number of unique vulnerabilities found in the matching processes, before filtering and pagination
paginationpage, showLimit, totalCount, totalPages, hasNextPage, and hasPrevPage

Example JSON result​

{
"time": "2024-05-29T20:02:39.924Z",
"lastUpdated": "2024-05-29T19:35:21.257Z",
"vulnerabilities": [
{
"report": {
"package": "d3-color",
"title": "d3-color vulnerable to ReDoS",
"published": "2022-09-29T14:12:55Z",
"credit": [
"UNSPECIFIED"
],
"id": "GHSA-36jr-mh4h-2g58",
"ids": {...},
"vulnerable": "< 3.1.0",
"severity": "high",
"description": "The d3-color module provides ...",
"nsolidMetaData": {
"hidden": false
}
},
"processes": [
{
"id": "24472c3ed21920005805bbd0770890003655b818",
"app": "dashboard",
"tags": [],
"hostname": "dashboard-55964b5d4-855qv",
"topLevel": 1,
"depChains": [
[
"d3-color@2.0.0"
]
]
},
{ ... }
],
"processCount": 5
}
],
"vulnerabilityCount": 1
}

query​

Subscribes to matching agent data on an interval.

OptionDescription
--fieldA field to request. If not specified, all fields are returned. nsolid-cli sends only one --field value correctly; to select several fields, call the Console API directly with repeated field= query parameters.
--intervalHow often to return the next object, in seconds by default (default: 1). You can add a unit suffix: ms, s, m, h, d, or w.
--qA query filter expression (see Query filters)

Usage

nsolid-cli query --q id=5

Returns newline-delimited JSON objects with framing objects.

Framing typeDescription
startThe query stream start frame
interval-startThe start of the records for this interval
agent-enterAn agent entry
summarySummary data about the entire (unfiltered) data set
interval-endThe last record for this interval frame

Example JSON result​

{"time":"2024-05-29T20:08:19.064Z","type":"start"}
{"time":"2024-05-29T20:08:19.065Z","type":"interval-start"}
{"time":"2024-05-29T20:08:19.065Z","type":"agent-enter","id":"24472c3ed21920005805bbd0770890003655b818","info":{ ... },"metrics":{ ... }}
{"time":"2024-05-29T20:08:19.065Z","type":"summary","matchingAgents":1,"totalAgents":1}
{"time":"2024-05-29T20:08:19.065Z","type":"interval-end"}
{"time":"2024-05-29T20:08:20.066Z","type":"interval-start"}
{"time":"2024-05-29T20:08:20.066Z","type":"metrics","id":"24472c3ed21920005805bbd0770890003655b818","metrics":{ ... }}
{"time":"2024-05-29T20:08:20.066Z","type":"summary","matchingAgents":1,"totalAgents":1}
{"time":"2024-05-29T20:08:20.066Z","type":"interval-end"}

summary​

Returns a summary of all connected N|Solid processes, with counts of matching properties and resources.

OptionDescription
--qA query filter expression (see Query filters)

Usage

nsolid-cli summary

Example JSON result​

{
"time": "2024-05-29T20:12:19.555Z",
"processes": 8,
"apps": {
"webserver": 5,
"portal": 2,
"demo": 1
},
"tags": {},
"rss": 2808512512,
"cpu": 196.852483,
"node": {
"24.21.0": 5,
"22.23.3": 3
},
"nsolid": {
"6.3.7": 8
},
"packages": 3945,
"vulnerabilities": {
"GHSA-36jr-mh4h-2g58": 1
},
"hiddenVulnerabilities": {}
}

export-settings​

Returns a JSON object with one or more settings, to back up or import later. The settings you can export are integrations, savedViews, and notifications.

OptionDescription
--itemOne item, or a comma-separated list of items, to export (required)

Usage

nsolid-cli export-settings --item integrations,savedViews,notifications > backup.nsconfig

Example JSON result​

{
"_metadata": {
"_timestamp": ""
},
"integrations": {},
"notifications": {},
"savedViews": {}
}

import-settings​

Applies previously exported settings. The settings you can import are integrations, savedViews, and notifications.

OptionDescription
--itemOne item, or a comma-separated list of items, to import (required)
--actionclean to replace the existing settings. If omitted, the imported settings are appended to the existing ones.
--attachThe file with the exported settings

Usage

nsolid-cli import-settings --item integrations --action clean --attach backup.nsconfig
NodeSource Support