Giter Club home page Giter Club logo

collaboration-system-event-logs's Introduction

Collaboration-System-Event-Logs

Event logging module is a part of the Collaboration system. This module deals with the logging of the user interaction events, such as view an article. This module works as a middleware in Django project and captures and filters the request based on the specification. The logs will be stored in elasticsearch using logstash.

Setup

To setup this module with the Collaboration system, perform the following steps:

1. Copy the `eventlog` folder into the root of the main Django project. 2. Go to project's `settings.py` file and in the set of the middlewares add following line:
MIDDLE_WARE = [
    ...,
    'evenlog.middleware.Middleware'
]

And, thats all, you are done!

Setting up ELK Stack with docker

  1. Place elasticsearch, logstash, kibana folders of evelog-Docker in the Collaboration-System repository.

  2. Replace the docker-compose.yml file of Collaboration-System repository with the evelog-Docker's docker-compose.yml.

  3. Go to eventlog/main/settings.py and change address and port as follows:

SERVER_CONF = {
		...,
		"address": "logstash",
                "port": 5000,
		...,
}
  1. Run the following commands inside the Collaboration-System repository:
   docker-compose build
   docker-compose up

Configuring the proxy

  1. To setup proxy go to eventlog/main/settings.py
  2. For SERVER_CONF set 'use_proxy' = True.
  3. Specify the proxy configuration as follows:
SERVER_CONF = {
		...,

              "proxies": {
                    "http": "http://proxy.cse.iitb.ac.in:80",
                    "https": "https://proxy.cse.iitb.ac.in:80",
                    "ftp": "ftp://proxy.cse.iitb.ac.in:80",
              }
}
  1. To add authentication for proxy add follwowing to SERVER_CONF else remove it:
SERVER_CONF = {
		...,
		"proxy_auth": {
                         "username": "<your-proxy-authentication-name>",
                         "password": "<your-proxy-authentication-password>"
                }
	
}

Debugging and Logging

Debugging module is defined in utils.py and enables 5 levels of logging along with some color customizations for better viewing.

  1. To enable debugging go to eventlog/main/settings.py.
  2. Set DEBUG = True

Installing Search API

  1. Install the python client for Elasticsearch using the following pip command: pip install elasticsearch
  2. Copy the search_api folder into the root of the main Django project.
  3. In the main project's settings.py file, add the 'search_api' in the Installed Apps list -
INSTALLED_APPS = [
    ...,
    'search_api'
]
  1. Also add the following line in the main project's urls.py file:
urlpatterns = [
    ...,
    url(r'^logapi/', include('search_api.urls'))
]
  1. To install the elasticsearchclient add the following in the requirements.text of Collaboration-System Repository
    ...,
    elasticsearch
  1. In the search_api/settings.py, add the elasticsearch hosts in SERVER_CONF
   ...,
   SERVER_CONF = [ "elasticsearch" ]
  1. Use the URLs to get the required data

collaboration-system-event-logs's People

Contributors

vermakartik avatar vishrutjetly avatar rahul-85 avatar fresearchgroup avatar

Watchers

James Cloos 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.