Giter Club home page Giter Club logo

proxy-log-generator's Introduction

Build Status Coverage Status

Proxy Log Generator

Streams fake web server logs. Primarily intended for testing of streaming with NiFi and Kafka.

In a Nutshell

  • Simulates a continuous web traffic, see an example
  • Generated logs are streamed to an HTTP endpoint
  • Locust UI for load configuration
  • Extensible, ships with NiFi and Kafka integration

Example Output

{'authenticated': 'antoine.dickerson', 'url': 'https://www.christywatts.com/735/201.php', 'timestamp': '2016-12-24 16:50:08', 'user_agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0', 'ip': '53.143.50.131', 'res_status': 404, 'res_size': 4129136}
{'authenticated': 'patrice.camacho', 'url': 'http://www.austinwalker.com/981.png', 'timestamp': '2016-12-24 16:50:08', 'user_agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36', 'ip': '48.26.166.195', 'res_status': 200, 'res_size': 590813}
{'authenticated': 'maurice.francis', 'url': 'https://www.frankie-paul.com/182.php', 'timestamp': '2016-12-24 16:50:08', 'user_agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36', 'ip': '117.45.110.155', 'res_status': 200, 'res_size': 3103266}
{'authenticated': '-', 'url': 'https://www.nicolemckinney.com/631/784/669/591.html', 'timestamp': '2016-12-24 16:50:08', 'user_agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0', 'ip': '66.220.33.180', 'res_status': 404, 'res_size': 1812680}
{'authenticated': '-', 'url': 'https://www.abbeyhickman.com/391.jpg', 'timestamp': '2016-12-24 16:50:08', 'user_agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0', 'ip': '181.196.3.20', 'res_status': 200, 'res_size': 1598792}

Dependencies

Installation

pip install --user -r requirements.txt && bower install

Usage

A local installation of Kafka and NiFi is assumed at the moment. Please check log_generator.sh and amend this section as needed.

init() {
    NIFI_HOME=~/nifi-1.0.0
    KAFKA_HOME=~/kafka_2.11-0.10.1.0
}

Start NiFi, Kafka and Locust UI by running the script below.

sh ./log_generator.sh start

Import a Streaming Example template to NiFi, start all processors.

Next, open up Locust UI at http://localhost:8089 and define how hard to you wish to hit the NiFi listener with generated logs.

Trigger the load and observe the streaming pipeline in NiFi.

Open up a Dashboard at http://localhost:3000 and observe changing log aggregations.

Architecture

TODO

proxy-log-generator's People

Contributors

tomaszezula avatar zezutom avatar

Watchers

 avatar  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.