This project is a Flask application for ingesting logs into Elasticsearch and providing a simple interface using Gradio to interact with the data. Elasticsearch is used for storing and querying logs.
To run this project locally, follow these steps:
Make sure you have Python installed and have a cloud instance of elastic.
- Clone the repo
git clone https://github.com/dyte-submissions/november-2023-hiring-v-kas-dangi.git
- Install dependencies in the project directory
This should start the server at port 3000.
pip install -r requirements.txt
- Replace CLOUD_ID with your cloud id and ELASTIC_PASSWORD with your elastic cloud deployment password
- Start the Flask app in the project directory
python app.py
- Start the Gradio app using
This should start the gradio app at the port 7860
gradio gradio/interface.py
- Open your browser and go to http://localhost:7860 to access the Gradio interface.
Utilize the Gradio interface to view the most recent 20 logs, search logs based on filters, and ingest new logs. The interface is organized into three tabs to facilitate these functionalities. To input log data, you must provide each field in a separate text box, both for ingesting and searching logs. It was done to improve user experience.
For direct ingestion in JSON format, send a POST request to the server at port 3000 using the /ingest API endpoint.
http://localhost:3000/ingest
The Home runs on
http://localhost:3000/get
And the Search runs on
http://localhost:3000/search
respectively
Vikas Dangi - @linkedin - b20238@students.iitmandi.ac.in
Project Link: Log Ingestor