Live status page for Flaha: https://status.flaha.org
GitHub Actions checks every site every 5 minutes, saves the results in data/, and
GitHub Pages serves the page. When a site goes down, a GitHub Issue is opened (you get
an email or GitHub mobile notification), and it closes on its own when the site is back.
| File | What it does |
|---|---|
sites.json |
The list of sites to monitor. Edit this to add or remove services. |
scripts/check.mjs |
Checks every site, updates data/*.json and sends alerts. |
.github/workflows/monitor.yml |
Runs the check every 5 minutes. |
.github/workflows/pages.yml |
Publishes the page when index.html changes. |
index.html |
The status page (English and Arabic). |
data/ |
Live results, written by the monitor. Don't edit by hand. |
- Keep the repo public. The page reads its live data from the repo, and public repos get unlimited free Actions minutes. A private repo would use about 8,600 minutes a month, while the free tier gives 2,000.
- Turn on Pages: go to Settings → Pages → Build and deployment and set Source = GitHub Actions.
- Point the domain: at your DNS provider for flaha.org, add
CNAME status → rafatahmed.github.io - Set the custom domain: go to Settings → Pages → Custom domain, enter
status.flaha.organd save. Tick Enforce HTTPS once the certificate is issued, which takes a few minutes to an hour. - Run the first check: go to Actions → Monitor → Run workflow.
- Get notified: make sure you are watching the repo (Watch → All Activity) so new incident issues reach your email or the GitHub app.
- Message @BotFather, send
/newbotand copy the bot token. - Send any message to your new bot, then open
https://api.telegram.org/bot<TOKEN>/getUpdatesand copychat.id. - In the repo, go to Settings → Secrets and variables → Actions, and add
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID.
Add an entry to sites.json:
{ "id": "api", "name": "Flaha API", "nameAr": "واجهة فلاحة", "group": "Services", "url": "https://api.flaha.org/health" }Optional fields for each site are slowMs (marks the site "Slow" above this response
time; the default is 3000), timeoutMs, and expect (text the page must contain, which
catches "200 OK but broken" pages).
- GitHub can delay scheduled runs by a few minutes when it's busy, so expect checks every 5 to 15 minutes.
- A site only counts as down after two failed attempts five seconds apart, which avoids false alarms.
- GitHub disables scheduled workflows in repos with no activity for 60 days. The monitor's own commits normally count as activity. If the workflow is ever disabled, re-enable it under Actions.
Run a check locally: node scripts/check.mjs. This needs Node 18 or newer and sends no
alerts without the tokens.