Skip to content
conorholdsPublic

About

Self-hosted uptime monitoring for apps, servers, and databases. Includes backups, alerts, and a web dashboard.

Resources

Stars

47 stars

Watchers

0 watching

Forks

Repository files navigation

SOMA

SOMA is a self-hosted monitoring service for HTTP/HTTPS endpoints, SSH-accessible servers, and PostgreSQL/MongoDB databases. It includes a web dashboard, a Prometheus metrics endpoint, and a pre-provisioned Grafana dashboard.

Note: This is unaudited software still in development, use at your own risk. This repository intentionally excludes build artifacts, backups, local configuration, and other non-essential files.

Features

  • HTTP/HTTPS uptime checks (optional separate frontend + API checks)
  • Server monitoring over SSH (CPU, memory, disk)
  • Database checks (PostgreSQL, MongoDB)
  • Automated daily backups with rotation
  • Notifications: Discord, Email (SMTP), Slack, Telegram
  • Web dashboard + public status page (optional password)
  • Prometheus metrics at /metrics
  • Grafana dashboard provisioning

Quick start (Docker)

git clone https://github.com/conorholds/soma.git
cd soma
cp config.json.example config.json
# edit config.json

docker compose up -d

Default endpoints:

  • Dashboard: http://localhost:9090/
  • Health: http://localhost:9090/health
  • Prometheus metrics: http://localhost:9090/metrics
  • Status page: http://localhost:9090/status

Changing the web port

Run locally:

WEB_PORT=8080 cargo run

With Docker, change the port mapping in docker-compose.yml (and the WEB_PORT env var) to your preferred port.

Configuration

All configuration is in config.json. Start from config.json.example.

Key sections:

  • notifications: per-channel settings
  • sites: HTTP/HTTPS checks (frontend_health_url, api_health_url, legacy health_url)
  • servers: SSH targets (ip, username)
  • databases: connection URIs for health checks and backups
  • status_page: enable/disable, title, optional password

Running from source

cp config.json.example config.json
# edit config.json

cargo run

Prometheus and Grafana

docker compose up starts:

  • SOMA (dashboard + metrics)
  • Prometheus
  • Grafana

Default endpoints (from docker-compose.yml):

  • Prometheus UI: http://localhost:9091/
  • Grafana: http://localhost:3000/ (default login admin / admin)

Prometheus scrapes SOMA inside the Docker network (soma:9090) and loads alert rules from ./prometheus/rules/.

Grafana is provisioned with:

  • a Prometheus datasource (grafana/provisioning/datasources/prometheus.yml)
  • a dashboard (grafana/dashboards/soma-overview.json)

Operational schedule

  • Health checks: every 60 seconds
  • Hourly status notifications: at the top of each hour (UTC)
  • Daily tasks: 00:00 UTC (backups + report + metrics reset)

Security

  • Do not commit config.json (it contains credentials and webhook URLs). Use config.json.example for templates.
  • If you run Grafana in production, change the default admin password in docker-compose.yml.

Contributing

Contributions are welcome via pull requests.

About

Self-hosted uptime monitoring for apps, servers, and databases. Includes backups, alerts, and a web dashboard.

Resources

Stars

47 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages