The logo is a pulse that ends in the green status dot. It replaces the plain wordmark in the console, sign-in, legal and API documentation headers and marks status page footers. Every page links an SVG favicon that follows the browser's light or dark scheme, a PNG fallback, an Apple touch icon and a web manifest; the README shows the logo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
153 lines
6.8 KiB
Markdown
153 lines
6.8 KiB
Markdown
<img src="docs/images/logo.svg" alt="" width="260">
|
|
|
|
# uptimesebi
|
|
|
|
[](https://git.zb-server.de/ZB-Server/uptimesebi/actions?workflow=ci.yaml) · License: AGPL-3.0-only
|
|
|
|
uptimesebi monitors websites, APIs and services from several regions and tells you when they are down, without false alarms from a single checker losing its network: a monitor only counts as down when **every** region it is checked from fails. It publishes status pages that stay online even while uptimesebi itself is not, and it can run entirely on your own infrastructure.
|
|
|
|
It is built for teams and hosting providers: organizations with members, roles and SSO, run either as a shared cloud service or self-hosted.
|
|
|
|

|
|
|
|
**What it does**
|
|
|
|
- **Checks:** HTTP(S) with keyword, JSON APIs with conditions on values, Prometheus queries, TCP, TLS certificate expiry, DNS, ICMP, and heartbeats pinged by cron jobs.
|
|
- **Multi-region:** checkers run per region, several per region for load and failover; any number of regions per monitor.
|
|
- **Alerting:** incidents with webhooks (signed) and email, confirmations, maintenance windows (one-off or recurring).
|
|
- **History:** charts and SLA from one hour to a year, per region; see what the checker saw (redirect chain, timing, certificate, response body).
|
|
- **Status pages:** unlimited, custom domains with automatic TLS, themes, Markdown, legal notice; served from cache during outages.
|
|
- **Organizations:** members, custom roles scoped to monitor groups or status pages, API tokens, OpenID Connect SSO per organization, enforced 2FA, audit log.
|
|
- **Privacy:** GDPR data export (JSON, PDF) and deletion, configurable retention, no telemetry.
|
|
- **Operations:** three stateless binaries, horizontally scalable; TimescaleDB and Redis (Sentinel supported); OpenAPI documentation.
|
|
|
|
## Installation
|
|
|
|
### Requirements
|
|
|
|
| To run | To develop |
|
|
| --- | --- |
|
|
| PostgreSQL 16 with TimescaleDB 2.30 | Go 1.27 |
|
|
| Redis 8, or Redis with Sentinel | Node.js 20 or newer |
|
|
| The container image or the binaries | Docker with Compose |
|
|
| | [sqlc](https://sqlc.dev) 1.31 and [golangci-lint](https://golangci-lint.run) 2.12, for `make generate` and `make lint` |
|
|
|
|
### Run locally
|
|
|
|
Start PostgreSQL and Redis, build the frontend, create the schema and start the API:
|
|
|
|
```sh
|
|
git clone https://git.zb-server.de/ZB-Server/uptimesebi.git
|
|
cd uptimesebi
|
|
cp .env.example .env
|
|
set -a && . ./.env && set +a
|
|
|
|
docker compose up -d --wait
|
|
npm ci && npm run build
|
|
go run ./cmd/api migrate up
|
|
go run ./cmd/api
|
|
```
|
|
|
|
Open <http://localhost:8080/signup>. On a self-hosted installation the first account also becomes the platform administrator.
|
|
|
|
Checks need a checker, which talks to the API only. In a second terminal, with the same environment loaded:
|
|
|
|
```sh
|
|
go run ./cmd/api region add local "Local"
|
|
export UPTIME_AGENT_TOKEN="$(go run ./cmd/api agent create --kind checker --region local --name local-1)"
|
|
go run ./cmd/checker
|
|
```
|
|
|
|
Status pages are served by their own process, on <http://localhost:8082/your-page-slug>:
|
|
|
|
```sh
|
|
export UPTIME_AGENT_TOKEN="$(go run ./cmd/api agent create --kind statuspage --name local)"
|
|
UPTIME_STATUSPAGE_CACHE_DIR=./.statuspage-cache go run ./cmd/statuspage
|
|
```
|
|
|
|
### Run in production
|
|
|
|
One image contains all three commands; `api` is the default entrypoint.
|
|
|
|
```sh
|
|
docker build -t uptimesebi .
|
|
docker run --rm --env-file .env uptimesebi migrate up # before every rollout
|
|
docker run -d --env-file .env -p 8080:8080 uptimesebi
|
|
docker run -d -e UPTIME_API_URL=https://uptime.example.com -e UPTIME_AGENT_TOKEN=usa_… \
|
|
--entrypoint /usr/local/bin/checker uptimesebi
|
|
```
|
|
|
|
All settings are environment variables; [`.env.example`](.env.example) lists them with explanations. In particular:
|
|
|
|
- `UPTIME_SECRET_KEYS` encrypts stored secrets. Generate one with `echo "k1:$(head -c32 /dev/urandom | base64)"` and keep it safe; rotate by prepending a new key.
|
|
- `UPTIME_PUBLIC_URL` is the address users reach the console at.
|
|
- `UPTIME_TRUSTED_PROXIES` must name your reverse proxy, or client addresses in the audit log and rate limits will be the proxy's.
|
|
- `UPTIME_RETENTION_*` set how long results, aggregates, audit entries and captured responses are kept.
|
|
|
|
Run as many API, checker and status page instances as you need; they share no local state. The supported setups are:
|
|
|
|
| Mode | Console and API | Checkers | Status pages |
|
|
| --- | --- | --- | --- |
|
|
| Cloud | hosted | hosted, organizations may add their own | hosted, organizations may add their own |
|
|
| Hybrid | hosted | at the customer | at the customer |
|
|
| Self-hosted | at the customer | at the customer | at the customer |
|
|
|
|
Checkers and status page servers reach the API over HTTPS and never the database, so they can run in other networks.
|
|
|
|
## Usage
|
|
|
|
Work in the console, or script everything through the REST API with an API token from **Settings → API tokens**:
|
|
|
|
```sh
|
|
curl -H "Authorization: Bearer ust_…" https://uptime.example.com/api/v1/org/monitors
|
|
```
|
|
|
|
The interactive API documentation is at `/api/docs` of every installation, the OpenAPI 3.1 document at `/api/openapi.json`.
|
|
|
|
## Examples
|
|
|
|
Create a monitor that checks a website from two regions every minute:
|
|
|
|
```sh
|
|
curl -X POST https://uptime.example.com/api/v1/org/monitors \
|
|
-H "Authorization: Bearer ust_…" -H "Content-Type: application/json" \
|
|
-d '{"name": "Shop", "type": "http", "target": "https://shop.example.com",
|
|
"interval_seconds": 60, "regions": ["<region id>", "<region id>"]}'
|
|
```
|
|
|
|
Report a nightly backup to a heartbeat monitor, including failures:
|
|
|
|
```sh
|
|
if backup.sh > /tmp/backup.log 2>&1; then
|
|
curl -fsS -m 10 --retry 3 https://uptime.example.com/hb/<token>
|
|
else
|
|
curl -fsS -m 10 --retry 3 --data-binary @/tmp/backup.log https://uptime.example.com/hb/<token>/fail
|
|
fi
|
|
```
|
|
|
|
A public status page:
|
|
|
|

|
|
|
|
## Development
|
|
|
|
```sh
|
|
make generate # sqlc and templ code
|
|
make test # needs the database and Redis from docker compose
|
|
make lint
|
|
```
|
|
|
|
The tests run against the `uptime_test` database and Redis database 15 from [`.env.example`](.env.example). CI runs lint, tests, builds and the image for every pull request ([`.gitea/workflows/ci.yaml`](.gitea/workflows/ci.yaml)).
|
|
|
|
Commits follow [Conventional Commits](https://www.conventionalcommits.org/). Code comments, commits and issues are in English; the interface is translated (English and German, `internal/i18n/locales`).
|
|
|
|
## License
|
|
|
|
[GNU Affero General Public License v3.0 only](LICENSE) © ZB-Server.
|
|
|
|
If you run a modified version as a network service, you must offer its source code to its users.
|
|
|
|
## Contributors and contact
|
|
|
|
Maintained by ZB-Server. Report bugs and ideas as [issues](https://git.zb-server.de/ZB-Server/uptimesebi/issues); please include the `request_id` from error messages.
|