Skip to the content.

uptime icon Uptime Monitor

An uptime monitoring service that continuously monitors the uptime of a list of websites. When it detects a website is down, it posts a Slack message notifying that the website is down, and another message when the website is back up again.

Table of Contents

Architecture

Flow

The architecture consists of:

Usage

All public endpoints are accessible under the base URL:

https://staging-uptime-monitor-vbvi.encr.app

Below are practical examples using curl. Replace IDs and URLs as needed.

Site Service

Site service

Add a site

curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}' \
  https://staging-uptime-monitor-vbvi.encr.app/site

Response:

{
  "id": 1,
  "url": "https://example.com"
}

List all sites

curl -s https://staging-uptime-monitor-vbvi.encr.app/site

Response:

{
  "sites": [
    { "id": 1, "url": "https://example.com" },
    { "id": 2, "url": "https://api.example.com/health" }
  ]
}

Get a site by ID

curl -s https://staging-uptime-monitor-vbvi.encr.app/site/1

Response:

{ "id": 1, "url": "https://example.com" }

Delete a site by ID

curl -s -X DELETE https://staging-uptime-monitor-vbvi.encr.app/site/1

Status 200 indicates success (empty body).

Monitor Service

Monitor service

Ping a URL on-demand

You can pass a bare hostname (scheme is optional; defaults to https).

curl -s https://staging-uptime-monitor-vbvi.encr.app/ping/example.com

Response:

{ "up": true }

Check a single monitored site by ID

curl -s -X POST https://staging-uptime-monitor-vbvi.encr.app/check/1

Status 200 indicates success (empty body).

Check all monitored sites concurrently

curl -s -X POST https://staging-uptime-monitor-vbvi.encr.app/checkall

Status 200 indicates success (empty body).

Get current status for all sites

curl -s https://staging-uptime-monitor-vbvi.encr.app/status

Response:

{
  "sites": {
    "1": { "up": true,  "checked_at": "2025-11-14T10:15:30Z" },
    "2": { "up": false, "checked_at": "2025-11-14T10:16:05Z" }
  }

Slack notifications (private integration)

Slack Service

The Slack endpoint is private and not exposed publicly. To enable notifications in your own deployment, configure the SlackWebhookURL secret so that the subscription can post messages when a site transitions between up and down states.

Contributing

Thank you for contributing!