https://github.com/aryamanz29/elastic-cfc
A Logs analyzer for developers builds on top of elastic search. 📜⚡
https://github.com/aryamanz29/elastic-cfc
celery django elasticsearch python react redis
Last synced: 4 months ago
JSON representation
A Logs analyzer for developers builds on top of elastic search. 📜⚡
- Host: GitHub
- URL: https://github.com/aryamanz29/elastic-cfc
- Owner: Aryamanz29
- Created: 2021-05-22T10:10:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-07T12:03:05.000Z (over 3 years ago)
- Last Synced: 2025-03-24T18:12:09.499Z (7 months ago)
- Topics: celery, django, elasticsearch, python, react, redis
- Language: Python
- Homepage: https://github.com/Aryamanz29/Elastic-CFC
- Size: 1.4 MB
- Stars: 14
- Watchers: 1
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING_GUIDELINES.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
EzLogs

"A ***Logs analyser** for developers build on top of [elasticsearch](https://www.elastic.co/)*"

## Open Source Programs ☀ :
- [Delta Winter of Code](https://dwoc.io/organisations/6150be5f2f6db90012a31058)
- [Script Winter of Code](https://swoc.scriptindia.org/#/project)

## Tech Stack 🚀 :
- 1. Django
- 2. Django Rest Framework
- 3. React
- 4. Elastic Search
- 5. Celery & Redis

## Docker Setup:
```
docker-compose up --build
```

## Local Setup 👨💻:
#### NOTE : You need to first setup [elastic search](https://www.elastic.co/) on our machine, Follow [this guide](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-18-04)
### 1.Virtual Environment Setup :
##### For Linux :
```
$. python3 -m venv env
$. source env/bin/activate
```
##### For Windows :
```
$. py -m venv env
$. env\Scripts\activate
```

#### 2. Installing Dependencies:
```
$. pip install wheel
$. pip install -r requirements.txt
```

#### 3. Create Database Tables and Superuser:
```
Note: For Windows Users Replace python3 with python
$. python3 manage.py makemigrations
$. python3 manage.py migrate
$. python3 manage.py createsuperuser
```

### 4. Install Redis and Start Server
```
$. sudo apt-get install redis-server
$. sudo service redis-server start
```
- `[Options: {start|stop|restart|force-reload|status}]`
##### For Windows Users :
Refer This Article : https://dev.to/divshekhar/how-to-install-redis-on-windows-10-3e99

### 5. Running Celery
`$. celery -A core worker -l INFO`
##### For Windows Users :
https://stackoverflow.com/questions/37255548/how-to-run-celery-on-windows

### 6. Run Server
```
$. python3 manage.py runserver
```

### 8. Run Frontend
```
cd frontend/
npm i
npm run start
```

### 9. Go Live :
- Now goto http://localhost:3000/ to test and run ezLogger.

### API Endpoints :
- http://localhost:8000/api/document/ *(For Uploading New Log File, METHOD = GET/POST)*
- http://localhost:8000/api/get-some-log-lines// *(For getting first 'N' lines from recent uploaded log, METHOD = GET)*
- http://localhost:8000/api/search/?q=&file_id= *(For getting search result based upon user search query, METHOD = GET/POST)*

## Want To Contribute ? 🙋
#### See Ideas List [here](https://github.com/Aryamanz29/Elastic-CFC/issues/17)
✨ CONTRIBUTORS ✨

## Working Screenshots 🕵 :

### Search Results `sample-log.log` :

### Sample log file `sample-log.log` :


## Contributing Guidelines :
1. Create a branch with feature/bug-fix name.
```
git branch
git checkout
```
- Shorthand for creating a branch and checkout to the branch
```
git checkout -b
```
2. After making the changes, run these commands.
```
git add . # To add all files to the staging area.
git add # To add specific file to the staging area.
git commit -m "commit message"
git push # While running for the first time, you'll encounter an error. Run the suggested command given by git cli.
```