⚠️ Passive Monitoring Only (No Direct Power System Connectivity)

⚡ SysMonitor

A real-time power outage & network monitoring tool built for COX's Bazar Cable Landing Station (COXCLS), BSCPLC — watching grid power, generator, and ATS behaviour around the clock, so nobody has to.

📱 Get the Android App See how it works
4
Devices Monitored
1918
Events Logged
154
Completed Cycles
82
Days Monitoring

On this page

📖 1. What is SysMonitor?

SysMonitor is a lightweight, self-hosted power & network outage monitoring tool built specifically for COX's Bazar CLS (COXCLS), a facility operated by BSCPLC that relies on grid power (PDB) with a generator + Automatic Transfer Switch (ATS) as backup.

It runs entirely on the local network and works passively — it only observes network reachability of monitoring points already on site. It does not connect to, control, or issue commands to the generator, ATS, or any power infrastructure. Its only job is to watch, record, and alert.

The idea is simple: instead of someone on shift having to notice a power drop, write it down on paper, and remember to log when the generator kicked in, SysMonitor watches two always-on network devices and infers the facility's power state from their reachability — then keeps a permanent, timestamped record of everything that happened, without anyone needing to touch a keyboard.

🔍

Detects outages automatically

No manual logging — the system notices the moment power drops.

⏱️

Tracks exact durations

PDB outage time and generator runtime, down to the second.

📚

Permanent history

Every outage cycle and event is preserved for reporting and audits.

📢

Instant alerts

Telegram, WhatsApp, and email notifications the moment something changes.

⚙️ 2. How it works

SysMonitor is a Django web application paired with a lightweight background monitor process. The two run as separate, independent services and communicate only through the shared database — so a restart of one never takes down the other:

1
Background monitor pings two reference points A "Holder" device (reflects grid/PDB power) and an "NVR" device (reflects generator/UPS power) are pinged every few seconds.
2
State changes are cross-checked between the two Comparing both devices together filters out false alarms like brief WiFi drops or a single device rebooting.
3
Confirmed changes are written to the database Outage start, generator start, power restore, and ATS switch-back are each timestamped as they happen.
4
The dashboard reflects it live The web dashboard auto-refreshes, showing current status, live device health, and a running event log.
5
Notifications fire in parallel The background monitor calls the notification dispatcher directly the moment a cycle-defining event happens — outages, generator starts, restores, and alarms.

🏗️ 3. Architecture

SysMonitor is deliberately split into small, independent pieces, each run as its own systemd service so a crash or restart in one never brings down the rest of the system:

writes state reads daily read fires alerts 🖥️ Holder Device reflects grid / PDB power 🎥 NVR Device reflects generator / UPS power 📡 Background Monitor systemd: sysmonitor-ping.service pings every few seconds 🗄️ SQLite Database events · cycles · users devices · notifications 🌐 Django Web App systemd: sysmonitor-web.service serves dashboard + APIs 💻 Browser any device on the network 📱 Android App auto network detection 💾 Backup Timer systemd: sysmonitor-backup.timer daily snapshot of the database 📢 Notification Gateways Telegram · WhatsApp · Email sent directly by the monitor

Three independent services, one shared database — that's the whole system:

ServiceJob
sysmonitor-pingPings the Holder & NVR devices continuously, writes confirmed state changes to the database, and fires notifications the instant something changes.
sysmonitor-webThe Django app — serves the dashboard, report, events, admin pages, and this documentation page, reading straight from the same database.
sysmonitor-backupA timer that snapshots the database on a daily schedule, so a bad write or disk issue never means losing the whole history.

🧠 4. The detection logic

A full, healthy outage cycle looks like this — grid drops, generator picks up the load, grid comes back, and the ATS quietly switches the load back to grid power:

🔴 Outage 🟡 Generator Running 🔵 ATS Switching 🟢 Normal

Every completed cycle is classified so abnormal situations stand out instead of getting lost in the log:

Cycle TypeMeaning
🟢 NormalClean cycle — outage, generator ran, power restored, ATS switched back cleanly.
🔵 ATS-onlyJust a brief ATS switch blip — not a real power outage.
🟡 IncompleteAn outage is currently in progress.
🟠 AlarmPower was restored but the generator/ATS didn't switch back as expected — flagged for review.
🔴 CriticalAn extended total failure — both reference points unreachable for a long stretch.
⚪ ManualEntered or corrected by hand via System Tools — for an outage the automatic monitor missed.

Why two devices instead of one?

Relying on a single ping target is unreliable — a device rebooting, a single WiFi hiccup, or a switch port flapping can all look identical to a real power outage. By requiring both the Holder and the NVR to agree before a state change is confirmed, one-off blips are filtered out automatically, and only genuine power events reach the log and the notification channels.

A maintenance mode can be switched on before planned network work (e.g. restarting a router), which pauses outage detection and notifications so planned downtime never gets logged as a false power outage.

✨ 5. Features

📊

Live Dashboard

Auto-refreshing status, device health, and daily outage summary.

📋

Event & Activity Logs

Full history of state changes plus an admin audit trail of every user action.

🔧

Generator Shifting Entry

Manual log of which generator is in auto mode and when it was switched.

🛠️

System Tools

Live internal state viewer, journal inspection, and manual cycle correction for admins.

🧾

Reports

Daily / historical outage & generator runtime reporting.

👥

Role-Based Access

Admin, User, Viewer, and Guest roles, each with a different set of visible pages.

🙋

Self-Service Profiles

Users manage their own contact details; sensitive fields need admin approval.

💾

Automated Backups

The database is backed up daily on a schedule, automatically.

🔔

Multi-Channel Alerts

Telegram, WhatsApp, and email — configured independently per recipient.

📱

Companion Android App

Auto-detects local vs external network and loads the right address.

🚧

Maintenance Mode

Pause detection during planned network work so it's never logged as an outage.

ℹ️

Public Docs Page

This page — readable by anyone, logged in or not, with no secrets exposed.

🧩 6. Tech stack

Built to be simple to operate on a single on-site machine — no external cloud dependency for the core monitoring loop:

Backend

Django (Python)

Serves the dashboard, admin pages, and internal APIs.

Database

SQLite

Single-file database, backed up automatically every day.

Monitoring

Python ping loop

Independent background service, decoupled from the web app.

Frontend

Vanilla HTML / CSS / JS

No build step or framework — fast to load, easy to audit.

Time handling

pytz — Asia/Dhaka

All timestamps are normalised to local Bangladesh time.

Notifications

Telegram · WhatsApp · SMTP

Telegram Bot API, Meta WhatsApp Cloud API, Gmail SMTP.

Process management

systemd services & timers

Web app, ping monitor, and backups each run as their own unit.

Mobile

Native Android wrapper (Java)

WebView-based app with network auto-detection and retry logic.

📢 7. Notifications

SysMonitor can alert designated recipients the moment a power event happens, over multiple channels:

ChannelUse case
🤖 Telegram BotInstant push alerts to any number of subscribed chats.
💬 WhatsAppBusiness API-based alerts to configured phone numbers.
✉️ EmailSMTP-based alerts for recipients who prefer email.

What triggers an alert

Each of these fires at most once per cycle — the dispatcher keeps track of what's already been sent, so recipients never get spammed with duplicate alerts for the same event.

🤖 To receive real-time Telegram alerts, message "Hi" to the SysMonitor notification bot on Telegram: @SysMonitorCOXCLS_bot. Access to the dashboard itself, and the exact notification recipient list, is managed privately by the COXCLS NOC team.

📱 8. Android App

A lightweight Android wrapper app is available for quick access to the SysMonitor dashboard from a phone — it automatically detects whether you're on the facility's local network or an external connection and loads the right address for you.

⚡ SysMonitor
🟢 All Systems Normal
Holder DeviceUP · 4ms
NVR DeviceUP · 6ms
GeneratorStandby
Last Outage2h 14m ago

SysMonitor Android App Preview — mobile dashboard interface showing system status, device cards, and monitoring information.

⚡ SysMonitor for Android

Auto network detection · swipe-to-refresh · connection retry · in-app log viewer

⬇️ Download APK
Installing requires enabling "Install from unknown sources" for your file manager / browser, since this is a direct APK download rather than a Play Store listing. Login credentials for the dashboard itself are issued privately by the COXCLS NOC team and are not published here.

🔐 9. Roles & Access Control

Access to the dashboard is account-based. Every account is assigned a role that determines exactly which pages appear in its navigation:

RoleCan see
AdminEverything — Dashboard, Report, Events, Generator Shifting Entry, plus Devices, Users, Notifications, Activity Log, and System Tools, including review/approval of pending profile changes.
UserDashboard, Report, Events, and Generator Shifting Entry.
ViewerDashboard, Report, and Events (no Generator Shifting Entry).
GuestDashboard and Report only.

When a user updates a sensitive field on their own profile (like their email or mobile number), the change is held as pending until an admin reviews and approves or rejects it — this page and its approval controls live right inside the admin's Users tab, so nothing changes silently.

This About & Docs page itself is the one exception to account-based access — it's intentionally public so anyone can understand what SysMonitor does before ever needing an account.

❓ 10. FAQ

Does SysMonitor control the generator or ATS?
No. It's strictly passive — it only pings network devices to infer power state. It never sends a command to the generator, ATS, or any power hardware.
What's the difference between Viewer and Guest?
Both can see the Dashboard and Report. Viewer additionally sees the Events log; Guest does not, and neither role sees Generator Shifting Entry or any admin page.
How are false alarms like a brief WiFi drop filtered out?
By requiring both the Holder and NVR devices to agree on a state change before it's confirmed. A single device blip on its own never gets logged as an outage.
What happens if I'm doing planned network maintenance?
Turn on Maintenance Mode from the dashboard first. It pauses outage detection and notifications for the duration you set, so a router restart or switch reboot is never mistaken for a real power outage.
Is my activity on the dashboard tracked?
Admin actions (creating/editing users and devices, approving profile changes, etc.) are recorded in an Activity Log visible only to admins, as an audit trail.
How often is the database backed up?
Automatically, once a day, via a dedicated systemd timer — independent of the web app and monitor services.
How do I get an account?
Accounts are created privately by the COXCLS NOC team, who also assign your role. Reach out using the contact details at the bottom of this page.
Can I use the dashboard without installing the Android app?
Yes — the web dashboard is fully responsive and works in any mobile browser. The Android app is just a convenience wrapper that also auto-detects local vs external network.

👤 11. About Us

SysMonitor is built and maintained in-house for the COXCLS NOC team at BSCPLC, to reduce manual outage tracking and give the team real-time visibility into facility power health.

JS

MD. Jikrul Sayeed Hossain

Developer · KUET, EEE (2K15) · COXCLS NOC, BSCPLC

Designed, built, and maintains SysMonitor end-to-end — the Django backend, the outage-detection logic, the notification system, and the companion Android app.

Questions, feedback, or issues with SysMonitor?

jikrul.sayeed@gmail.com