A modern, lightweight, and self-hosted uptime monitoring solution. Get instant email alerts the moment your services go offline.
PingMonitor is an automated uptime monitoring tool that performs health checks on your target URLs and APIs. It pings configured endpoints, logs response metrics, and sends immediate, non-spamming email notifications when status changes occur.
- Secure Authentication: JWT-based session security with bcrypt password hashing and token rotation.
- Real-Time Heartbeats: Concurrent ping checks with configurable timeout limits.
- Insightful Logging: Captures HTTP response status codes, latencies, and down-time histories.
- Smart Alerting: Dispatch email alerts via Resend on state transitions (e.g.,
UP➔DOWN) without duplicates. - 🧹 Auto Data Purging: Automated TTL indices to prune logs older than 7 days, maintaining a lightweight database.
- Docker Native: Run the entire stack locally with a single command.
| Layer | Technologies |
|---|---|
| Frontend | React, Vite, Axios, React Router, Vanilla CSS |
| Backend | Node.js, Express, MongoDB (Mongoose) |
| Caching & Queues | Redis, BullMQ (optional for distributed regions) |
| Notification | Resend / SMTP |
You can run PingMonitor either through Docker Compose (recommended) or locally with Node.js.
Ensure you have Docker installed and running on your system.
-
Clone the repository:
git clone https://github.com/omjaisatya/PingMonitor.git cd PingMonitor -
Configure environment variables: Create a
.envfile in theserverdirectory and define your Resend API credentials (other system variables are pre-configured indocker-compose.yml):RESEND_API_KEY=your_resend_api_key_here SENDER_EMAIL=your_verified_sender_email_here
-
Start the containers:
docker compose up --build -d
-
Access the application:
- Frontend Dashboard: http://localhost:5173
- Backend API: http://localhost:3006
- Node.js v18+
- MongoDB instance (local or Atlas)
-
Navigate to the server folder and install dependencies:
cd server npm install -
Create a
.envfile in theserverdirectory usingserver/.env.exampleas a template. -
Start the server in development mode:
npm run dev
-
Open a new terminal window, navigate to the client folder, and install dependencies:
cd client npm install -
Create a
.env.developmentfile in theclientdirectory:VITE_SERVER_URL=http://localhost:3006/api VITE_APP_TITLE=Ping Monitor (Local Dev)
-
Start the client development server:
npm run dev
-
Open your browser to http://localhost:5173.
| Variable | Example | Description |
|---|---|---|
PORT |
3006 |
Port the Express server listens on |
MONGO_URL |
mongodb://localhost:27017/pingMonitor |
MongoDB connection string |
JWT_SECRET |
your-jwt-signing-secret |
High-entropy key used for signing JWTs |
JWT_REFRESH_SECRET |
your-jwt-refresh-secret |
High-entropy key used for signing refresh tokens |
RESEND_API_KEY |
re_xxx |
Resend API credential |
SENDER_EMAIL |
alerts@domain.com |
Email address registered on Resend |
FRONTEND_URL |
http://localhost:5173 |
Origin URL of client application (for CORS) |
| Variable | Example | Description |
|---|---|---|
VITE_SERVER_URL |
http://localhost:3006/api |
Base endpoint path for the server API |
VITE_APP_TITLE |
PingMonitor |
Browser tab document title |
Detailed architectures and guides are stored in the /docs directory:
- API Reference Guide — Exhaustive REST endpoint definitions and payloads.
- SMTP Setup Guide — Configuring custom mail delivery servers using Nodemailer.
- Multi-Region Scaling — Deploying regional worker pinger instances.
The system relies on a scheduled cron runner executing health checks:
Every 60 Seconds
│
▼
Fetch Active Monitors from DB
│
▼
Concurrent Ping Checks (10s Timeout)
│
┌────────────────┴────────────────┐
HTTP 2xx/3xx Error / Timeout / 4xx+
│ │
▼ ▼
State: UP State: DOWN
│ │
│ Status Change?
│ ┌───────┴───────┐
│ YES NO
│ │ │
│ ▼ │
│ Send Email Alert │
└────────────────┬────────────────┘ │
▼ ▼
Save Ping Logs to DB IgnoreThis project is licensed under the MIT License. See LICENSE for details.