A lightweight chaos engineering engine for Linux. Wreck probabilistically injects failures into running systems on a configurable schedule - process signals, port hijacking - and automatically reverts them after a set duration.
git clone https://github.com/Gappylul/wreck
cd wreck
go build ./cmd/wreckRequires Go 1.26+.
./wreckWreck looks for wreck.yaml in the current directory. On SIGINT or SIGTERM, it restores all active environment mutations before exiting.
version: "1"
settings:
interval: "10s" # How often to evaluate disruptions
structured: false # true for JSON logs, false for plain text
disruptions:
- name: "kill-api-server"
type: "process"
selector:
pattern: "my-api" # Passed to pgrep -f
action: "SIGKILL" # SIGKILL | SIGSTOP | SIGTERM
probability: 0.5 # 0.0–1.0
duration: "10s" # Optional. Auto-reverts after this delay
- name: "hijack-web-port"
type: "network"
selector:
port: 8080
action: "occupy"
probability: 1.0
duration: "5s"| Field | Default | Description |
|---|---|---|
interval |
10s |
Tick interval between disruption evaluations |
structured |
false |
Emit JSON logs when true |
| Field | Required | Description |
|---|---|---|
name |
✓ | Identifier used in logs |
type |
✓ | process or network |
selector.pattern |
process only | Regex passed to pgrep -f |
selector.port |
network only | TCP port to occupy |
action |
✓ | Signal name (SIGKILL, SIGSTOP, SIGTERM) or occupy |
probability |
✓ | Likelihood of triggering on each tick (0.0–1.0) |
duration |
- | If set, automatically reverts the disruption after this delay |
process - Finds all PIDs matching selector.pattern via pgrep -f and sends the specified signal. On shutdown (or after duration expires), sends SIGCONT to any SIGSTOP'd processes.
network - Binds a TCP listener on selector.port, preventing any other process from accepting connections there. Releases the bind on shutdown or after duration expires.
Each disruption is evaluated independently on every tick. Probability is resolved using crypto/rand - a value of 0.5 means roughly a 50% chance of triggering per interval.
.
├── cmd/wreck/main.go # Engine entrypoint, tick loop, shutdown handling
├── internal/config/config.go # YAML parsing and validation
└── internal/disruptor/
├── process.go # Process signal injection and revert
└── network.go # Port occupation and revert
MIT - see LICENSE for details.