8000 GitHub - rafatahmed/Flaha_status · GitHub
[go: up one dir, main page]

Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

Flaha Status

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.

One-time setup

  1. 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.
  2. Turn on Pages: go to Settings → Pages → Build and deployment and set Source = GitHub Actions.
  3. Point the domain: at your DNS provider for flaha.org, add CNAME status → rafatahmed.github.io
  4. Set the custom domain: go to Settings → Pages → Custom domain, enter status.flaha.org and save. Tick Enforce HTTPS once the certificate is issued, which takes a few minutes to an hour.
  5. Run the first check: go to Actions → Monitor → Run workflow.
  6. Get notified: make sure you are watching the repo (Watch → All Activity) so new incident issues reach your email or the GitHub app.

Optional: Telegram alerts

  1. Message @BotFather, send /newbot and copy the bot token.
  2. Send any message to your new bot, then open https://api.telegram.org/bot<TOKEN>/getUpdates and copy chat.id.
  3. In the repo, go to Settings → Secrets and variables → Actions, and add TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID.

Adding a service

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).

Notes

  • 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0