Skip to content

A microservices-based uptime monitoring system built with Python (Flask) and MySQL. Features a decoupled architecture with a dedicated "Watcher" service for asset management and a "Logger" service for historical telemetry persistence.

Notifications You must be signed in to change notification settings

Pranee-2212/Distributed-Asset-Health-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 Distributed Asset Health Monitor

A lightweight Microservice-based system designed to monitor the uptime and latency of digital assets (websites/APIs) in real-time.


🏗 Architecture Overview

The project is architectured as two decoupled services to ensure scalability and professional separation of concerns:

  • Watch (Service A): The "Brain" of the operation. It handles the Asset Registry (CRUD) and serves as the execution engine for health checks and pings.
  • Logger (Service B): The "Historian." A dedicated service that receives telemetry data from Service A and persists it into a MySQL database.

🚀 Key Features

  • Dynamic Asset Management: Add or remove target URLs in real-time via the web dashboard.
  • Health Telemetry: Captures HTTP status codes and precise round-trip latency (ms).
  • Decoupled Communication: Services communicate via RESTful JSON payloads, preventing database bottlenecks.
  • Database Driven: Uses dedicated schemas for asset configurations and historical logs.

🛠 Tech Stack

  • Languages: Python 3.x, JavaScript (ES6+)
  • Frameworks: Flask (Python), Vanilla JS (Frontend)
  • Database: MySQL 8.0
  • Protocols: HTTP/REST, JSON

📂 Project Structure

As seen in the project root:

.
├── Logger/                  # Service B: Data Persistence & History
│   ├── Service_B.py
│   └── .env 
|   |__.envexample                # DB Credentials for history_db
├── Watch/                   # Service A: Asset Management & Pings
│   ├── Service_A.py
│   └── .env  
|   |__.envexample                # DB Credentials for monitor_db
├── templates/               # Frontend UI
│   └── index.html           # Dashboard Interface
├── .gitignore               # Excludes venv, __pycache__, and .env
├── DB_SCHEM.sql             # MySQL Database Setup Scripts
├── README.md                # Project Documentation
└── requirements.txt         # Global Python Dependencies

🚦 Getting Started

  1. Database Configuration Initialize your databases by running the provided SQL script:
-- Open your MySQL terminal or Workbench and run:
source DB_SCHEM.sql

##2. Environment Setup You must have a .env file in both the /Logger and /Watch directories:

DB_HOST=localhost
DB_USER=your_username
DB_PASSWORD=your_password
  1. Installation Install the necessary libraries using the global requirements file:
pip install -r requirements.txt

About

A microservices-based uptime monitoring system built with Python (Flask) and MySQL. Features a decoupled architecture with a dedicated "Watcher" service for asset management and a "Logger" service for historical telemetry persistence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors