shellgraph

Command line

The subcommands, flags, configuration file and environment variables of shellgraph.

shellgraph login

Tests a collector token and keeps it in the configuration file.

shellgraph login --server https://shellgraph.example.net --token <token>
FlagDefaultDescription
--server(required)Server URL.
--token(required)Collector token. Create it in the server UI.
--insecure-httpoffAccept an http:// URL that is not localhost or 127.0.0.1.

shellgraph scan

Scans one VLAN and sends one report.

shellgraph scan --env Production --vlan app-10
FlagDefaultDescription
--envmenuEnvironment name or ID. Without it, the collector shows a menu.
--vlanmenuVLAN name or ID. Without it, the collector shows a menu.
--concurrency32Number of hosts to scan at the same time.
--samples3Number of socket samples on each host. More samples find more short connections.
--interval5sTime between two samples.
--dry-runoffPrint the report as JSON and do not send it.
--allow-largeoffAllow a VLAN with more than 4096 addresses.
--insecure-httpoffAccept an http:// server URL that is not localhost or 127.0.0.1.

A scan of a /24 VLAN with the default flags takes approximately 15 to 30 seconds. If you stop the scan (Ctrl-C), the collector sends nothing.

shellgraph probe

Collects one host and prints it as JSON. It does not use the server.

shellgraph probe -i ~/.ssh/id_ed25519 shellgraph@10.0.10.12
FlagDefaultDescription
-issh-agentPrivate key file. A key with a passphrase must be in the ssh-agent.
-p22SSH port.
-samples1Number of socket samples.
-interval5sTime between two samples.
-no-sudooffDo not use sudo for ss.
-rawoffPrint the raw output of the collection script, not the result.

shellgraph version

Prints the version.

Configuration

shellgraph login writes the server URL and the token to a file with mode 0600:

SystemFile
Linux~/.config/shellgraph/config.json
macOS~/Library/Application Support/shellgraph/config.json

Environment variables

VariableDescription
SHELLGRAPH_SERVERServer URL. It overrides the configuration file.
SHELLGRAPH_TOKENCollector token. It overrides the configuration file.