Giter Club home page Giter Club logo

attack-prometheus's Introduction

How To Use

Before Start

For mac OS, please install python3, virtualenv, docker, docker-compose. You can follow link below before start:

How To Develop Your Own

Create file under attacker/task, for example atreus.py. Then create data in attacker/data, for example create atreus.py. After 2 files created, then edit file task you created previously attacker/task/atreus.py, then import your data from data.atreus import STATIC_DATA.

After attacker created, please create service exporter config here nginx/access-log-exporter/lite-atreus.yml. Edit the file base on your service/path requirements.

Running All Requirements

Execute command below to start all requirement services, for example if you want to start atreus:

make run-dev SERVICE=atreus

After execute command above you will have port open in 9090, 9100, 9093, 8080, 3000, 80, 4040. So make sure that, the port does not open before this service up. And oh, I think you want to know, why we need open too much port. It will be amazing to have all of those service, trust me!.

Remember that, all of the port can be open in localhost, for example Grafana. With user (admin) and password (foobar) You know all of the basic now, then, we can continue to the next phase, below!.

Running Attacker

After all require services up, you need to boot the attacker with command below:

make prepare-attack
make attack-me SERVICE=atreus

make prepare-attack used to setup virtual environment for your python. It will isolate the python module for this project from globals.

This is the cool stuff, attacker is, the tools to help you make a load test to the service and make the grafana dashboard looks alive. After execute command above, you'll be have awesome locust dashboard under http://*:8089. Open the locust dashboard and input some data to make load test to the service.

How To Debug

After services and attacker up, it will create some important file to help you investigate when facing issue. Focus on the folder log, there are have some files which can help you to debug when facing issue/error.

  • log/access-log-exporter/access-log-exporter.log (if rps does not appears in grafana)
  • log/nginx/access.log (nginx access log)
  • log/nginx/error.log (if nginx got issue)
  • log/supervisor (supervisor/manager log)

How To Create Dashboard From File

Before start all of the service, you can create your own dashboad from provisioning folder grafana/provisioning/dashboards. Create your own json, or just copy paste from the existing and edit some related data, you know what I mean la....

Or if you want to create your ownn dashboard from scratch, just try use this simple query to collecting the rps:

sum(rate(lite_zeus_http_response_count_total[5m]))

Contact When Have Problem

If you facing issue when running this service, visit me at Terpusat

References

attack-prometheus's People

Contributors

prakasa-tkpd avatar

Watchers

 avatar

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.