Infrastructure Layer

Command Line Interface

Gremlin Command line interface allows the user to perform commands directly from the host. The impact of the attack will be localized to that host.

Commands

Attacks

The attack command starts a localized gremlin attack. Please visit attacks for all attacks and parameters.

bash
1# Example of a CPU attack
2gremlin attack cpu -l 60 -c 1
3Setting up cpu gremlin with guid 'd626a85b-6303-11e9-bdf9-4029fe350366' for 60 seconds on 1 core
4Setup successfully completed
5Running cpu gremlin with guid 'd626a85b-6303-11e9-bdf9-4029fe350366' for 60 seconds on 1 core
6Attack on cpu_1 completed successfully

Attack-container

The attack-container command starts an attack against a locally-hosted Docker container. Please visit attacks for all attacks and parameters.

In order to run attack-container, the container must reside on the host and must be specified.

bash
1# Example of a Container attack
2gremlin attack-container a1a9ee7eb256 -l 60 -c 1

Check

The check command inspects the state of your Gremlin installation. The currently-supported set of checks is: api, auth, docker, env, files, os, proxy, tags, version.

You may run an individual check by passing it as an argument to the check command. For example, gremlin check proxy. If you leave this off (gremlin check), then all checks will be run.

This output is not sent to Gremlin, but it may be helpful to our support team if we need to triage an issue with installation.

bash
1# Example of running "gremlin check os":
2gremlin check os
3
4os
5====================================================
6OS Name : Ubuntu
7OS Version : 16.04
8System Time : 1569450673 (2019-09-25 22:31:13)
9NTP Time : 1569450673 (2019-09-25 22:31:13)

Help

The help command list all of the available commands and displays help.

Init

The init commands sets up the client configuration. A prompt will appear to request a Team ID and Team Secret.

bash
1# Registers client to control plane using specified Team ID and Team Secret. Gremlind will restart after completion
2gremlin init
3Please input your Team ID:
49676868b-60d2-5ebe-aa66-b8b3cef23bb9
5Please input your Team Secret:
6
7Using 9676868b-60d2-5ebe-aa66-b8b3cef23bb9 for Organization Id
8Using 172.31.0.108 for identifier

Please see the table below for optional parameters.

ParameterFlagDescription
Service-s stringThe service the client belongs to.
Region-r stringThe region the client is in.
Zone-z stringThe zone the client is in.
Public IP-i IP AddressThe public IP Address for the client.
Hostname-h hostnameThe public hostname for the client.
Tags-t stringA tag to apply to the cilent for identification and description purposes (see also GREMLIN_CLIENT_TAGS in Advanced Configuration.)

Logout

The logout command removes this Gremlin client from the Gremlin Control Plane.

Rollback

The rollback command interrupts an active attack. It can also revert the last impact.

bash
1gremlin rollback
2Rolling back f1c1e96c-630e-11e9-92d3-ad4cfee292e2
3Rollback running in PID 28383, attack running in PID 28155, rollback issuing a kill to attack process, which will roll itself back
4Reverted 1 attack

Rollback-container

The rollback-container command interrupts an active attack against a local Docker container.

Status

The status command will display the status of any attacks.

bash
1# Example of gremlin status
2gremlin status
3 ARGS START END GUID
4↻ cpu -l 300 -c 1 2019-04-20 01:52:24 f1c1e96c-630e-11e9-92d3-ad4cfee292e2

To display a specific attack use -u followed by the GUID.

bash
1# Example of status of a specific GUID
2gremlin status -u 601e52e7-630f-11e9-bdf9-4029fe350366
3601e52e7-630f-11e9-bdf9-4029fe350366 - Successful
4
5Start Time End Time
62019-04-20 01:55:29 2019-04-20 02:00:30
7
8Args
9cpu -l 300 -c 1

Version

The version command will state the installed version of Gremlin.

bash
1gremlin version
2gremlin version 2.10.0