Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Distributed service monitor with real-time health checks, property change detection, and alerting via WhatsApp—powered by centralized API Gateway data.

Notifications You must be signed in to change notification settings

gabrielmendezsoares/monitor

Repository files navigation

🖥️ Monitor

📋 Overview

Monitor is a robust and extensible observability service designed to track and assess the health of distributed systems by querying registered API endpoints. It supports real-time evaluations, change detection, and flexible alerting through various channels such as WhatsApp.

By querying centralized API Gateway sources, Monitor dynamically retrieves system status data, identifies added/removed/modified properties, and determines availability state changes. It offers structured insight into service health over time, reducing the need for manual checks while surfacing actionable performance signals.

🎯 Objectives

  • Continuously check the health of registered applications through centralized API Gateway routes
  • Detect and classify property-level changes: additions, modifications, removals
  • Track service availability and log status transitions with timestamps
  • Measure performance (e.g., response time) per monitored endpoint
  • Format results into structured messages with rich context for alerting
  • Deliver monitoring reports via WhatsApp or integrate with external dashboards
  • Reduce manual oversight through automatic detection and reporting workflows
  • Support flexible, pluggable architecture for easy expansion and environment customization

📦 Quick Start

⚠️ Prerequisites

  • Node.js20.14.0JavaScript runtime environment
  • MySQL8.0Relational database
  • API Gateway3.0.3External API orchestration service

⚙️ Setup

# Clone & navigate
git clone <repository-url> && cd monitor

# Configure environment
cp .env.example .env  # Edit with your settings

# Install dependencies (auto-runs database setup)
npm install

💡 Database: Import storage.sql.example before running npm install


⚡ Usage

🛠️ Development

npm run start:development

🏗️ Production

npm run build && npm run start:production

📚 Command Reference

🧰 Core

Command Description
npm run start:development Start the application in development
npm run start:production Start the application in production
npm run build Build the application for production
npm run build:watch Build the application with watch mode
npm run clean Clean application build artifacts

🛢️ Database

Command Description
npm run db:pull Pull database schema into Prisma across all schemas
npm run db:push Push Prisma schema to the database across all schemas
npm run db:generate Generate Prisma Client for all schemas
npm run db:migrate:dev Run development migrations across all schemas
npm run db:migrate:deploy Deploy migrations to production across all schemas
npm run db:studio Open Prisma Studio (GUI) across all schemas
npm run db:reset Reset database (pull + generate) for all schemas

🐳 Docker

Command Description
npm run docker:build:development Build Docker image for development
npm run docker:build:production Build Docker image for production
npm run docker:run:development Run development Docker container
npm run docker:run:production Run production Docker container
npm run docker:compose:up:development Start Docker Compose in development
npm run docker:compose:up:production Start Docker Compose in production
npm run docker:compose:up:build:development Start & rebuild Docker Compose in development
npm run docker:compose:up:build:production Start & rebuild Docker Compose in production
npm run docker:compose:down Stop Docker Compose services
npm run docker:compose:logs View Docker Compose logs
npm run docker:prune Clean up unused Docker resources

🧪 Testing

Command Description
npm test Run all tests once
npm run test:watch Run tests in watch mode
npm run test:coverage Run tests and generate a coverage report

About

Distributed service monitor with real-time health checks, property change detection, and alerting via WhatsApp—powered by centralized API Gateway data.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published