vaquar khan
vaquar khan

Reputation: 11479

Springboot chaos-monkey assaults [killApplicationActive and memoryActive] not working

I am using Springboot 2.3.1.RELEASE and chaos monkey its working fine for latencyActive and exceptionsActive.

 <dependency>
        <groupId>de.codecentric</groupId>
        <artifactId>chaos-monkey-spring-boot</artifactId>
        <version>2.2.0</version>
    </dependency>

Following two assaults not working

Kill application

     chaos.monkey.assaults.killApplicationActive=true
     chaos.monkey.assaults.level=3

Memory

    chaos.monkey.assaults.memoryActive=true
    chaos.monkey.assaults.memoryMillisecondsHoldFilledMemory=90000
    chaos.monkey.assaults.memoryMillisecondsWaitNextIncrease=1000
    chaos.monkey.assaults.memoryFillIncrementFraction=90.15
    chaos.monkey.assaults.memoryFillTargetFraction=90.25

Upvotes: 1

Views: 1972

Answers (4)

TWICE
TWICE

Reputation: 33

LatencyActive and ExceptionsActive assaults are low impact assault(Request type), whereas KillApp and Memory are high impact assaults(Runtime assault). So Request type assault can be triggered just by loading them whereas Runtime assault requires an additional step after loading them.

Trigger this Http endpoint and that should execute the assault: /chaosmonkey/assaults/runtime/attack

Upvotes: 0

goku
goku

Reputation: 66

To Kill an application manually follow the below step:

1) Create the assault by:

POST: https://{{server-address}}/{{app-name}}/actuator/chaosmonkey/assaults

{
    "level": 1,
    "deterministic": false,
    "latencyActive": false,
    "exceptionsActive": false,
    "killApplicationActive": true,
    "memoryActive": false,
    "cpuActive": false }

2) Run the created assault by:

POST: https://{{server-address}}/{{app-name}}/actuator/chaosmonkey/assaults/runtime/attack

Upvotes: 2

sakshi goyal
sakshi goyal

Reputation: 1

Use property value for "chaos.monkey.assaults.runtime.scope.assault.cron.expression" as cron expression like */1 * * * * ? or any valid cron expression, to enable chaos monkey runtime assaults on a schedule.

Use property value as OFF otherwise(also default value)

links: https://codecentric.github.io/chaos-monkey-spring-boot/2.1.0/#configuration https://www.programmersought.com/article/11861551911/

Upvotes: 0

Sourabh Parime
Sourabh Parime

Reputation: 31

App kill and memory kill attacks need the attribute runtimeAssaultCronExpression set to a valid cron expression like " * * * * * * ". By default it is set to "OFF"

See documentation: https://codecentric.github.io/chaos-monkey-spring-boot/2.2.0/#_appkiller_assault

Upvotes: 3

Related Questions