GithubHelp home page GithubHelp logo

konstruktoid / disruella Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 62 KB

A very small digitalized primate responsible for randomly preventing something from continuing as usual or as expected.

License: Apache License 2.0

Python 100.00%
chaos-engineering python3 systemd sre high-availability test-automation resilience python-black hacktoberfest

disruella's Introduction

Disruella

disruella is the disrupting Cebuella, a very small digitalized primate responsible for randomly preventing something from continuing as usual or as expected.

Inspired by Chaos Monkey and similar projects, disruella is used on a single host to force basic testing of application redundency and failover logic.

Usage

usage: disruella.py [-h] [-r] [-s SERVICE [SERVICE ...]] [-t] [-v]

options:
  -h, --help            show this help message and exit
  -r, --reboot          allow the host to be rebooted
  -s SERVICE [SERVICE ...], --service SERVICE [SERVICE ...]
                        a service disruella should focus on, otherwise a random PID will be chosen
  -t, --test            don't disrupt anything, just test
  -v, --verbose         print messages to console

Use systemd timers or the command line to execute disruella.

Logging

The generated logs can be found using sudo journalctl SYSLOG_IDENTIFIER=disruella.

Example

$ ./disruella/disruella.py -v -t -s 'cron'
host_fqdn: ubuntu-jammy
reboot: False
test: True
verbose: True
disruella: Resting, rolled a 3
$ ./disruella/disruella.py -v -t -s 'cron'
host_fqdn: ubuntu-jammy
reboot: False
test: True
verbose: True
[psutil.Process(pid=685, name='cron', status='sleeping', started='18:49:42')]
{'cmdline': ['/usr/sbin/cron', '-f', '-P'], 'name': 'cron', 'username': 'root', 'pid': 685, 'status': 'sleeping'}
disruella: Terminating PID '685' (<bound method Process.name of psutil.Process(pid=685, name='cron', status='sleeping', started='18:49:42')>) on ubuntu-jammy - TEST
$ journalctl -r SYSLOG_IDENTIFIER=disruella
Dec 31 00:25:39 ubuntu-jammy disruella[3586]: Terminating PID '685' (<bound method Process.name of psutil.Process(pid=685, name='cron', status='sleeping', started='18:49:42')>) on ubuntu-jammy - TEST
Dec 31 00:25:38 ubuntu-jammy disruella[3585]: Resting, rolled a 3
Dec 31 00:25:04 ubuntu-jammy disruella[3567]: Terminating PID '685' (<bound method Process.name of psutil.Process(pid=685, name='cron', status='sleeping', started='18:49:42')>) on ubuntu-jammy - TEST
Dec 31 00:25:01 ubuntu-jammy disruella[3566]: Resting, rolled a 2

Contributing

Do you want to contribute? Great! Contributions are always welcome, no matter how large or small. If you found something odd, feel free to submit a issue, improve the code by creating a pull request, or by sponsoring this project.

License

Apache License Version 2.0

Author Information

https://github.com/konstruktoid

disruella's People

Contributors

konstruktoid avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

disruella's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/codeql-analysis.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
.github/workflows/issues.yml
  • pozil/auto-assign-issue v2.0.0
.github/workflows/linting.yml
pip_requirements
requirements-dev.txt
requirements.txt

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.