prerequisite : -
- install pip
- install elasticsearch
- install logstash
- install kibana
- pip install virtualenv
- For gmail , please provide acces to less secure apps, otherwise won't be able to send email
steps to Run : -
- brew services start elasticsearch
- brew services start kibana
- git clone git@github.com:rajgaurav1989/DjangoELK_Stack.git
- cd DjangoELK_Stack
- virtualenv venv
- source venv/bin/activate
- pip install -r requirements.txt
- /usr/local/bin/logstash -f ./logstash.conf in new terminal tab at same pwd
- python manage.py runserver
- open browser goto http://localhost:8000/admin/
- username : 'raj' password: 'raj'
- create a superuser from ui with properemailId, as it will be used to get your confirmation mail
- logout from my credentials
- configure ADMIN_EMAIL_PASSWORD, CRON_EMAIL_PASSWORD,CRON_EMAIL in ELK_App/settings.py
- login with you credentials
- For gmail , please provide acces to less secure apps, otherwise won't be able to send email
- test the app , note the emails are sent in async using threads
Steps to run optional task : -
- sudo chmod u+x mycron.py
- crontab -e
- */30 * * * * /usr/bin/python /path/to/mycron.py
elastic search (/index/type) : -
- /email-send-index/doc/
- /logelk/elkcheck