Coder Social home page Coder Social 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.

Setting up ELK Stack with docker

  1. Clone the collaboration-Communities Repository by typing following command and follow the instructions to install the system.
$ git clone https://github.com/fresearchgroup/Collaboration-System.git
  1. Add/replace the following lines in .env file to add user and password for Event API Authorization

    	EVENTAPI_TOKEN_USER=<name-of-user>
    	EVENTAPI_TOKEN_PASS=<password>
    
  2. Generating a new Token. To generate a new Token type the following command

    	$ python3 manage.py generateToken --n

    i. Use --r flag instead of --n for renewing the flag ii. Use --g flag to get value for the current User

  3. Copy the value of the token and paste in .env file

    	EVENT_API_TOKEN=<token-generated>
    
  4. In .env change the value of LOG_TYPE to ip address of logstash(see step 11 to know how to get the address of logstash).

  5. In .env change the value of LOG_PORT to port on which logstash is running.

  6. In .env change the value of ELASTICSEARCH_ADDRESS to ip address of elasticsearch(see step 11 to know how to get the address of elasticsearch).

  7. Run the server using the following command

    	$ python3 manage.py runserver
  8. Running ELK Stack in docker. change to evelog-Docker folder using the following command

    	$ cd evelog-Docker	
  9. Run the following command to build and start docker

    	$ docker-compose build
    	$ docker-compose up
  10. Getting the ip address of logstash and elasticsearch(When running on same pc). Open a new terminal window and type the following command to get the name of logstash and elasticsearch container

    	$ sudo docker ps
  11. Once you get the name of container run the following command to inspect the docker container

    	$ sudo docker inspect <container-name>
  12. There is a field mentioning the ip address of container. Copy it to the desired location.

  13. Getting the ip address of ELK(when running on different machines). For different machines use the ip address of machine on which docker is running.

collaboration-system-event-logs's People

Contributors

abhijitbonik avatar fresearchgroup avatar rahul-85 avatar vermakartik avatar vishrutjetly 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.