From 9ff23a0828ff1fd0beaf45af827c07633f904884 Mon Sep 17 00:00:00 2001 From: Mahmoud20301 Date: Thu, 17 Sep 2026 00:36:16 +0300 Subject: [PATCH] new --- README.md | 113 +++++++++++++++++++++++++++++++++ uptime-kuma-config-export.json | 102 +++++++++++++++++++++++++++++ 2 files changed, 215 insertions(+) create mode 100644 README.md create mode 100644 uptime-kuma-config-export.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..ccc2e3a --- /dev/null +++ b/README.md @@ -0,0 +1,113 @@ +# Uptime Kuma POC — Monitoring & Alerting on Ghaymah Cloud + +## Goal + +Deploy Uptime Kuma as a containerized app on Ghaymah Cloud, prove out +HTTP monitoring + Telegram alerting, and expose a public status page — +without building a monitoring system from scratch. + +## Architecture + +``` + Internet + | + v + +-------------------+ + | Ghaymah Cloud | + +-------------------+ + | | + v v + +------------------+ +------------------+ + | Uptime Kuma | | demo-web-server | + | (container) |-->| (nginx) | + | port 3001 | | port 80 | + +------------------+ +------------------+ + | | + HTTP check Alert on + every 60s Down/Up + | | + v v + Public Status Telegram + Page +``` + +## What was deployed + +| App | Image | Port | Instances | Volume | +|--------------------|----------------------------|------|-----------|--------------| +| `uptime-kuma` | `louislam/uptime-kuma:2` | 3001 | 1 | `/app/data` | +| `demo-web-server` | `nginx` | 80 | 1 | none | + +Both run as single-instance Ghaymah Apps. Uptime Kuma is intentionally +kept at **1 instance** — it stores its data in a local SQLite database, +so scaling it out would split monitor history across separate, +inconsistent instances. + +`demo-web-server` (plain nginx) was added as a self-owned target to +monitor, so the POC watches infrastructure we actually control rather +than a third-party test endpoint. + +## Monitoring setup + +- **Monitor:** `test app` +- **Type:** HTTP(s) +- **Target:** `https://demo-web-server-web-9b9b121d.hosted.cumin.dev/` +- **Check interval:** every 60 seconds +- **Retries:** 0 (flags Down immediately — good for fast POC testing) +- **Timeout:** 48 seconds + +During setup the monitor was pointed first at `httpstat.us/200` (found +unstable, frequent 502s) and then `httpbin.org/status/200` for +stability testing, before finally being switched to the team's own +nginx instance. + +## Alerting + +- **Channel:** Telegram +- Created via `@BotFather`, bot token and chat ID configured as an + Uptime Kuma notification, linked to the `test app` monitor. +- **Tested:** forced a Down state (pointed the monitor at an endpoint + returning HTTP 502) and confirmed a Telegram alert arrived; then + restored a healthy endpoint and confirmed the recovery (Up) alert + arrived as well. + +## Public Status Page + +- **URL:** https://uptime-kuma-web-3aa83c30.hosted.cumin.dev/status/ghaymah-status +- **Access:** public, no login required +- Shows overall status ("All Systems Operational"), the `test app` + monitor grouped under **Services**, its uptime percentage, and a + recent heartbeat history bar. + +## Data persistence + +Uptime Kuma stores its SQLite database and configuration under +`/app/data` inside the container, which is mounted to a persistent +Ghaymah volume. Restarting or redeploying the container does not lose +monitors, notification settings, or status page configuration. + +## Export / configuration snapshot + +This Uptime Kuma version (2.5.4) does not currently expose a +Settings > Backup/Export screen, so `uptime-kuma-config-export.json` +in this folder was assembled by hand from the live dashboard to +document every setting used in this POC (monitor config, notification +setup, status page config, deployment parameters). Secrets (bot +token, chat ID) are intentionally redacted from that file. + +## How to verify it yourself + +1. Open the [status page](https://uptime-kuma-web-3aa83c30.hosted.cumin.dev/status/ghaymah-status) — no login needed. +2. To test alerting: edit the `test app` monitor's URL to point at any + endpoint that returns a non-2xx status, save, and wait up to 60 + seconds for the next heartbeat. A Down alert should arrive on + Telegram. Point it back at a healthy URL to see the Up recovery + alert. + +## Next steps (not yet done) + +- Put Uptime Kuma behind a custom domain / HTTPS via reverse proxy + (Ghaymah already terminates HTTPS on its own subdomains, so this is + optional for the POC). +- Consider Telegram bot token rotation before handing this off, since + the token was shared in a chat during setup. diff --git a/uptime-kuma-config-export.json b/uptime-kuma-config-export.json new file mode 100644 index 0000000..c122656 --- /dev/null +++ b/uptime-kuma-config-export.json @@ -0,0 +1,102 @@ +{ + "export_info": { + "note": "Manual configuration export. This Uptime Kuma version (2.5.4) does not expose a Settings > Backup/Export screen, so this file was assembled by hand from the live dashboard to document the POC exactly as deployed.", + "exported_by": "Mahmoud", + "export_date": "2026-09-16", + "uptime_kuma_version": "2.5.4" + }, + "infrastructure": { + "platform": "Ghaymah Cloud", + "deployment_type": "Containerized App", + "apps": [ + { + "app_name": "uptime-kuma", + "container_image": "louislam/uptime-kuma:2", + "size": "Starter", + "instances": 1, + "port": { + "name": "web", + "container_port": 3001 + }, + "volume": { + "mount_path": "/app/data", + "purpose": "Persist SQLite database, monitors, notification settings and status page config across restarts" + }, + "sleep_when_idle": false, + "run_once": false, + "public_url": "https://uptime-kuma-web-3aa83c30.hosted.cumin.dev" + }, + { + "app_name": "demo-web-server", + "container_image": "nginx", + "size": "Starter", + "instances": 1, + "port": { + "name": "web", + "container_port": 80 + }, + "purpose": "Simple, self-owned target service to monitor (replacing the public httpbin.org test endpoint)", + "public_url": "https://demo-web-server-web-9b9b121d.hosted.cumin.dev/" + } + ] + }, + "database": { + "type": "SQLite", + "reason": "Single instance deployment, no concurrent-write requirements, uses the persistent volume already mounted at /app/data" + }, + "monitors": [ + { + "friendly_name": "test app", + "monitor_type": "HTTP(s)", + "url": "https://demo-web-server-web-9b9b121d.hosted.cumin.dev/", + "heartbeat_interval_seconds": 60, + "retries": 0, + "request_timeout_seconds": 48, + "resend_notification_if_down_x_times": 0, + "method": "GET", + "notes": "Originally pointed at https://httpstat.us/200 (unstable, returned intermittent 502s), then https://httpbin.org/status/200 for stability testing, finally switched to the self-owned nginx demo server above." + } + ], + "notifications": [ + { + "friendly_name": "My Telegram Alert (1)", + "type": "Telegram", + "linked_to_monitors": ["test app"], + "bot_token": "REDACTED - stored securely in Uptime Kuma, not included in this export", + "chat_id": "REDACTED - stored securely in Uptime Kuma, not included in this export", + "tested": true, + "test_result": "Down and Up alerts both confirmed delivered to Telegram during failover testing" + } + ], + "status_page": { + "slug": "ghaymah-status", + "title": "Ghaymah Services Status", + "public_url": "https://uptime-kuma-web-3aa83c30.hosted.cumin.dev/status/ghaymah-status", + "access": "Public, no login required", + "groups": [ + { + "name": "Services", + "monitors": ["test app"] + } + ], + "refresh_interval_seconds": 300, + "theme": "Auto" + }, + "testing_performed": [ + { + "test": "DOWN detection", + "method": "Pointed monitor at an endpoint returning HTTP 502", + "result": "Monitor correctly flagged as Down, event logged with message 'Request failed with status code 502'" + }, + { + "test": "UP recovery", + "method": "Switched monitor URL to a stable 200-returning endpoint", + "result": "Monitor correctly recovered to Up status, uptime percentage began climbing" + }, + { + "test": "Telegram alerting", + "method": "Observed notifications during the Down -> Up transition above", + "result": "Alerts received on Telegram bot for both state changes" + } + ] +}