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 experiment. Please visit experiments for all experiments and parameters.
1# Example of a CPU attack2gremlin attack cpu -l 60 -c 13Setting up cpu gremlin with guid 'd626a85b-6303-11e9-bdf9-4029fe350366' for 60 seconds on 1 core4Setup successfully completed5Running cpu gremlin with guid 'd626a85b-6303-11e9-bdf9-4029fe350366' for 60 seconds on 1 core6Attack on cpu_1 completed successfully
Attack-container
The attack-container
command starts an experiment against a locally-hosted Docker container. Please visit experiments for all experiments and parameters.
In order to run attack-container
, the container must reside on the host and must be specified.
1# Example of a Container experiment2gremlin 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 contact Gremlin Support to triage an installation issue.
1# Example of running "gremlin check os":2gremlin check os34os5====================================================6OS Name : Ubuntu7OS Version : 16.048System 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 agent configuration. A prompt will appear to request a Team ID
and Team Secret
.
1# Registers agent to control plane using specified Team ID and Team Secret. Gremlind will restart after completion2gremlin init3Please input your Team ID:49676868b-60d2-5ebe-aa66-b8b3cef23bb95Please input your Team Secret:67Using 9676868b-60d2-5ebe-aa66-b8b3cef23bb9 for Organization Id8Using 172.31.0.108 for identifier
Please see the table below for optional parameters.
Parameter | Flag | Description |
---|---|---|
Service | -s string | The service the client belongs to. |
Region | -r string | The region the client is in. |
Zone | -z string | The zone the client is in. |
Public IP | -i IP Address | The public IP Address for the client. |
Hostname | -h hostname | The public hostname for the client. |
Tags | -t string | A tag to apply to the client for identification and description purposes (see also GREMLIN_CLIENT_TAGS in Advanced Configuration.) |
Logout
The logout
command removes this Gremlin Agent from the Gremlin Control Plane.
Rollback
The rollback
command interrupts an active experiment. It can also revert the last impact.
1gremlin rollback2Rolling back f1c1e96c-630e-11e9-92d3-ad4cfee292e23Rollback running in PID 28383, attack running in PID 28155, rollback issuing a kill to attack process, which will roll itself back4Reverted 1 attack
Rollback-container
The rollback-container
command interrupts an active experiment against a local Docker container.
Status
The status
command will display the status of any experiments.
1# Example of gremlin status2gremlin status3 ARGS START END GUID4↻ 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
.
1# Example of status of a specific GUID2gremlin status -u 601e52e7-630f-11e9-bdf9-4029fe3503663601e52e7-630f-11e9-bdf9-4029fe350366 - Successful45Start Time End Time62019-04-20 01:55:29 2019-04-20 02:00:3078Args9cpu -l 300 -c 1
Version
The version
command will state the installed version of Gremlin.
1gremlin version2gremlin version 2.10.0