Skip to content

anjalysuresh/Collaboration-System-Event-Logs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 71.6%
  • Shell 28.4%