Extremely simple, static, server-free uptime monitoring. No procurement or ATO needed*.
*Statements about ATO not yet verified.
This monitors the uptime/downtime status of a single website, without:
- needing an ATO
- procuring and setting up a commercial monitoring solution
- hosting a server
- running a database
- Clone this repository to your own GitHub account / organization. (Forking it appears to break GitHub Actions.)
- Delete the contents of
log.txt
andreadlog.txt
, but leave the empty files in place. - Find and replace
18f.gsa.gov
everywhere in the repo with your own URL. As of this writing, it's only in:- The header in
index.html
- The
curl
line in.github/workflows/ping.yaml
- The header in
- Make sure GitHub Pages is enabled to deploy your
main
branch at/
.
The page will update a little while after every status check, which by default runs every 15 minutes.
To run the server check manually, to make sure it's working or to force the first deploy:
- Go to the Actions tab.
- In the left sidebar, select "Check server status".
- In the light blue bar, there will be a "Run workflow" dropdown.
- Click it, make sure the branch is "main", and click "Run workflow".
Contributions are welcome!
To run this locally, first clone the repository, cd
into the folder, then run:
python3 -m http.server
This will run a simple server to serve the static page. Visit localhost:8000 to see the page.
If you need log data, just run this command like 50 times, sometimes changing up
to dn
to simulate downtime:
echo "$(TZ=US/Eastern date -Iseconds) up" > log.txt
Then run:
tail -n 65 log.txt > readlog.txt
This monitors a single site and records the uptime/downtime in a log. It displays the last 65 events, showing the uptime/downtime in a simple chart.
Process:
- Every fifteen minutes, a scheduled GitHub Action checks the status of the website.
- It records the status in a log,
log.txt
. The log is append-only, so we can track uptime over all time. - It copies the last 65 events to a separate log,
readlog.txt
. Instead of reading a log with potentially thousands of entries, we only load the smaller set of entries inreadlog.txt
for display. - The scheduled GitHub action commits these changes, saving the data, using these files as the data source.
- Each commit, GitHub redeploys the GitHub Pages page with the new data.
- Check for accessibility / 508 compliance
- Multi-site monitoring
- Settings file for monitored domains, cadence, etc.