Skip to content
Jamie Blair
Technical prototypePythonFlaskMonitoringDevOps

Uptime Monitor

Background thread pings the portfolio API and site every 60 seconds, recording response times. Graphs the last 24 hours of data pulled live from the server using Canvas charts.

Five lighthouse lanterns at varying brightness levels, representing endpoint uptime monitoring.

Ping interval

60 seconds

History

24 hours

Backend

Flask + threading

Chart

Canvas (zero deps)

Figures shown for this technical prototype are self-reported and have not been independently verified.

How it works

1Daemon Thread
260s Ping
3HTTP GET
4Record Status
5JSON Write
6API Endpoint
7Canvas Chart

How It Works

Daemon thread launches with Flask app via gunicorn. Every 60 seconds: HTTP GET to each target, record status + response time in ms. Append to JSON file, keep last 1,440 entries (24h). API endpoint returns history, frontend draws Canvas chart.

Decisions

Daemon thread over cron - simpler, dies with the app. JSON file storage because 24h of 1-minute checks is only 1,440 entries (trivially small). Canvas charts over a chart library to keep dependencies at zero. Atomic file writes prevent corruption.

Security

  • Atomic file writes prevent data corruption
  • Read-only monitoring - no write access to monitored targets

Next step / direct enquiry

Want to discuss a similar build?

Describe the business problem and I will help identify a practical, testable route to working software.