Skip to content

About

Monitor your HTTP Endpoints in one place.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

API Monitor Dashboard

API Monitor DB is a Go + Postgres dashboard for monitoring HTTP endpoints. Try here: https://monitor.architdewan.dev/ You can create checks, run them manually, let the scheduler run them automatically, and view recent health and latency in a simple dashboard.

What it does

  • Create, edit, and delete API checks
  • Configure method, expected status range, interval, timeout, and enabled/disabled state
  • Run checks manually from the UI
  • Run checks automatically on a schedule
  • Store run history in Postgres
  • Show latest status, latency, failure streak, and current incident start time
  • View per-check history and charts

Tech stack

  • Go
  • Postgres
  • Docker Compose for the database
  • Dockerfile for the app container

Run locally

Start the full stack:

docker compose up -d --build

Or, for local development, start only Postgres:

docker compose -f compose.yaml -f compose.local.yaml up -d db

Then start the app on your machine:

go run ./cmd/server

Open:

http://localhost:8080

Database config

Set DATABASE_URL if you want to use a different Postgres instance.

If you do not set it, the app uses:

postgres://postgres:postgres@localhost:5432/apimonitordb?sslmode=disable

Current project status

Right now:

  • Postgres is dockerized
  • The Go app is dockerized
  • The Go app runs locally with go run ./cmd/server
  • The scheduler runs in-process with the web app

This means the full app can run locally or on a VM with Docker Compose.

Deploy on a VM with Docker Compose

On the server, Docker must be installed and running:

sudo systemctl enable --now docker
sudo systemctl status docker --no-pager

Then deploy from the project directory:

docker compose up -d --build
docker compose ps
curl -i http://localhost/healthz
curl -i https://monitor.architdewan.dev/healthz

If the app is not healthy, inspect logs:

docker compose logs --tail=100 app
docker compose logs --tail=100 caddy
docker compose logs --tail=100 db

The monitor.architdewan.dev hostname is served by Caddy, which listens on ports 80 and 443 and proxies requests to the app on port 8080. The Oracle VM firewall and Oracle subnet/security list must allow inbound 80 and 443.

Continuous deployment

GitHub Actions deploys master to the Oracle VM over SSH. Configure these repo secrets before relying on automatic deploys:

ORACLE_HOST=192.18.159.62
ORACLE_USER=opc
ORACLE_SSH_KEY=<private SSH key contents>
ORACLE_APP_DIR=/home/opc/APIMonitorDB

The workflow runs tests, SSHes into the VM, resets the repo to origin/master, rebuilds the app image, starts Docker Compose, and checks the public health URL.

Main folders

  • cmd/server: app entrypoint
  • internal/app: app startup and scheduler boot
  • internal/config: environment config
  • internal/httpserver: routes and template rendering
  • internal/monitor: monitoring logic and scheduler behavior
  • internal/store: Postgres persistence
  • web/templates: dashboard and form templates

Notes

  • check_runs history currently keeps growing unless you clean it up manually
  • Alerts and user accounts are not built yet

About

Monitor your HTTP Endpoints in one place.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages