Skip to content

RipudamanM/FAQ-Semantic-Search-and-Evaluation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server Downtime Prediction with Machine Learning

Overview

This project aims to predict server downtime using machine learning models such as XGBoost, Random Forest, and Support Vector Machines (SVM). It leverages historical data from server logs and performance metrics to forecast potential downtimes and prevent system failures. The project integrates Flask for building a web application, Prometheus for real-time server metric collection, and Grafana for monitoring and visualizing server performance.

Features

  • Machine Learning Models: Utilizes models like XGBoost, Random Forest, and SVM to predict server downtimes.
  • Real-Time Monitoring: Implements Prometheus for collecting server metrics and Grafana for data visualization.
  • Web Interface: Provides a Flask-based frontend to view predictions and visualizations.
  • Prediction Accuracy: Evaluates models using accuracy, precision, recall, and F1 score.

System Architecture

The system architecture includes:

  1. Data Collection: Server logs and performance metrics are collected using Prometheus.
  2. Data Preprocessing: The collected data is preprocessed, cleaned, and used to train machine learning models.
  3. Model Training and Prediction: XGBoost, Random Forest, and SVM models are trained and used to predict server downtime.
  4. Visualization: Grafana dashboards visualize real-time server metrics and model predictions.
  5. Flask Frontend: A Flask-based web application allows users to interact with the predictions and monitor server health.

Installation

Prerequisites

  • Python 3.x
  • Git
  • Prometheus
  • Grafana
  • Flask
  • Machine learning libraries (e.g., XGBoost, scikit-learn, pandas)

Setup Steps

  1. Clone the Repository

    git clone https://github.com/yourusername/server-downtime-prediction.git
    cd server-downtime-prediction
  2. Install Dependencies

    Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate   # On Windows use `venv\Scripts\activate`

    Install required Python packages:

    pip install -r requirements.txt
  3. Setup Prometheus and Grafana

    Follow the official documentation to set up Prometheus and Grafana to collect and visualize server metrics.

  4. Train the Model

    The machine learning models can be trained using the provided training script:

    python train_model.py

    This will generate the trained models and save them for later use in predictions.

  5. Run the Flask App

    Start the Flask app to see the frontend:

    python app.py

    Visit http://127.0.0.1:5000 in your browser to interact with the prediction system.

Usage

  1. Open the web interface hosted on http://127.0.0.1:5000.
  2. View real-time server metrics and downtime predictions.
  3. Adjust settings or refresh data to monitor server health in real time.

Evaluation Metrics

  • Accuracy: Measures the overall correctness of the predictions.
  • Precision: Measures the accuracy of positive predictions.
  • Recall: Measures how many actual downtimes were correctly identified.
  • F1 Score: The harmonic mean of precision and recall, providing a balance between the two.

Contributing

Feel free to fork the repository, open issues, or submit pull requests. Contributions are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

The project also integrating a Flask frontend, allowing users to input queries and receive accurate answers from the system. This combination of SBERT and Flask creates an efficient and responsive FAQ system, with a focus on providing precise and contextually relevant answers

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors