v-kas-dangi / Log-Ingestor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About The Project

Home-Page

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.

(back to top)

Built With

(back to top)

Getting Started

To run this project locally, follow these steps:

Prerequisites

Make sure you have Python installed and have a cloud instance of elastic.

Installation

  1. Clone the repo
    git clone https://github.com/dyte-submissions/november-2023-hiring-v-kas-dangi.git
  2. Install dependencies in the project directory
    pip install -r requirements.txt
    This should start the server at port 3000.
  3. Replace CLOUD_ID with your cloud id and ELASTIC_PASSWORD with your elastic cloud deployment password
  4. Start the Flask app in the project directory
    python app.py
  5. Start the Gradio app using
    gradio gradio/interface.py
    This should start the gradio app at the port 7860
  6. Open your browser and go to http://localhost:7860 to access the Gradio interface.

Usage

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

(back to top)

Contact

Vikas Dangi - @linkedin - b20238@students.iitmandi.ac.in

Project Link: Log Ingestor

(back to top)

About


Languages

Language:Python 72.0%Language:Jupyter Notebook 28.0%