Create CPU attack
POST {{gremlin_api}}/attacks/new
Create a new attack.
Review Gremlin API docs about creating, halting, and listing attacks, examples of creating attacks, and attack parameters that can be included.
Under the request Body tab, we will configure our attack and include the containerId
environment variable initialized in the previous request. Additionally we will pass parameters to attack a single core for the duration of 60 seconds.
Under the Tests tab, we will initialize a new environment variable called guid
to identify the attack, in order to pass this info to any subsequent requests.
You may need to view the effects of your attack in Grafana, or another preferred monitoring tool.
Request Body
{"command"=>{"type"=>"cpu", "args"=>["-c", "2", "--length", "60"]}, "target"=>{"type"=>"Exact", "containers"=>{"ids"=>["{{containerId}}"]}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | Use a team-level Gremlin API key | |
Content-Type | string |
RESPONSES
status: Created
"47d23fd7-bd2d-11e9-a377-02421dbb6307"