Skip to content

Website uptime checker with scheduled scans and Discord notifications

License

Notifications You must be signed in to change notification settings

xfy0012/Status-Watcher-

Repository files navigation


Status-Watcher-

Website uptime checker with scheduled scans and Discord notifications


· Report Bug · Request Feature

Contributors Forks Stargazers Issues project_license


About The Project

WEB UI EXAMPLE

Web UI Screenshot

Status Watcher is a lightweight website monitoring tool that periodically checks website availability and sends real-time notifications via Discord when downtime is detected. The project is built with Flask, SQLite, and APScheduler, and optionally integrates with Prometheus and Grafana for observability.

  • Manage monitored websites via a Web UI
  • One-click deployment with Docker
  • Prometheus metrics collection and Grafana visualization
  • Real-time alerts via Discord Webhook

Features

  • Periodic website availability checks
  • Real-time Discord notifications
  • Web UI for CRUD operations on monitored sites
  • Prometheus metrics (status code, response time, status changes)
  • Grafana dashboard integration

Built With


Getting Started

Environment Setup

Before running the project, create a .env file in the project root directory and add your Discord webhook URL:

DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your_webhook_id/your_webhook_token

***DISCORD ALERT EXAMPLE *** discordexample

Prerequisites

  • Python 3.8+
  • pip
  • Docker & Docker Compose
  • SQLite

Local Installation

# Clone the repository
git clone https://github.com/xfy0012/Status-Watcher-.git
cd Status-Watcher-
# Install dependencies
pip install -r requirements.txt
# Start the service
python run.py

Visit: http://localhost:5000

Docker Compose (Recommended)

docker-compose up --build

Testing

This project includes automated tests for API endpoints and core business logic.

To run all tests, make sure you have installed the dependencies, then run:

pytest

Test coverage includes:

  • API endpoints (CRUD for websites)
  • Website status checking logic (with mocks)
  • Error handling for invalid input and not found resources

Test files are located in the tests/ directory.


Usage

  • Add/delete monitored websites via the Web UI
  • The system automatically checks website status on a schedule
  • Status changes trigger real-time Discord Webhook notifications
  • Prometheus collects monitoring metrics, which can be visualized in Grafana

API Overview

  • GET /api/websites Get all monitored websites
  • POST /api/websites Add a new website
  • PUT /api/websites/<id> Update a website
  • DELETE /api/websites/<id> Delete a website

Roadmap & TODO

  • Website monitoring and alerting
  • Web UI management
  • Prometheus & Grafana integration

Plan

  • User system and permissions
  • Email/Slack/Telegram notifications
  • More advanced monitoring metrics and reports

Known Issues & Limitations

  • All data currently belongs to user_id=1; multi-user and permissions are not implemented
  • Discord Webhook must be configured via environment variable
  • No API authentication or authorization
  • Only HTTP/HTTPS website monitoring is supported

License

Distributed under the MIT License. See LICENSE for more information.


About

Website uptime checker with scheduled scans and Discord notifications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published