danger-mouse
state mutating server for stress testing your monitoring setup
Install
go get github.com/bpostlethwaite/danger-mouse
go install
danger-mouse requires a configuration file danger.json
in one of these directories:
./
/etc
/var/lib/danger/
for the following example we will copy the default config into /etc
cp $GOPATH/src/github.com/bpostlethwaite/danger-mouse/danger.json /etc/danger.json
finally start the daemon with (provided you have included your GOPATH/bin
in your path) with
danger-mouse
permissions
If the configuration file or the working directory of danger-mouse is set in a file with higher than user permissions you will have to elevate permissions with
sudo danger-mouse
For a more concise start script symlink danger-mouse to danger with
ln -s $GOPATH/bin/danger-mouse /usr/local/bin/danger
Usage
the following assumes you have symlinked to danger
Daemon control
start the daemon process
danger
stop the daemon process
danger -s stop
Danger Commands
memup
Increase the memory of the server process by n mb
danger memup 60
memdown
Decrease the memory of the server back to running requirements
danger memdown
ping
Change the returned status code of the url ping/
danger ping 500
cpu
Burn 100% CPU for n seconds
danger cpu 30
dbup
Set the file size of the db located at (the configurable) work-dir/db-file
by n mb
danger dbup 100
dbdown
Truncate the file size of the db file to 0 bytes
danger dbdown
License MIT