2.7 KiB
2.7 KiB
First deployment checklist
A pragmatic list for the first production-ish Monlet stand-up. Adjust per environment.
1. Secrets
- Generate
MONLET_AUTH_TOKEN(openssl rand -hex 32) and store it in your secret manager. - Generate a PostgreSQL password and store it in your secret manager.
- Decide which notifier channels you want and gather their credentials (Telegram bot token + chat id, webhook URL, Alertmanager URL).
2. Database
- Provision PostgreSQL 16+.
- Create
monletdatabase and role withCREATE/USAGEon the schema. - Set
MONLET_DATABASE_URL=postgresql+asyncpg://.... - Run
alembic upgrade headfrom a one-shot container or the server image. - Verify
\dtshowsagents, checks, events, incidents, notification_outbox.
3. Server
- Set env vars per
server/.env.example(see alsoserver/README.md). - Start container; verify
GET /api/v1/healthand/api/v1/readyreturn 200. - Verify
/metricsexposesmonlet_server_*. - Confirm an authenticated
GET /api/v1/agentsreturns{ items: [], next_cursor: null }. - Confirm logs show no unredacted token/cookie material.
4. Agent (per host)
- Install binary (see
agent/systemd/). - Render
config.tomlfromagent/config.example.tomlwith hostname or explicitagent_id, and[server].token. - Start under systemd; verify a heartbeat reaches the server (
GET /api/v1/agents). - Run one configured check and verify a row appears in
/api/v1/checksand an event in/api/v1/events/query.
5. Notifications
- Enable at least one notifier in server env (
MONLET_NOTIFIER_*). - Force a
criticalevent from one agent and confirm an outbox row reachessent(GET /api/v1/notifiers/outbox). - Resolve the check and confirm a
resolvedoutbox row is emitted.
6. Web UI
- Set
MONLET_API_BASE_URLandMONLET_API_TOKENfor the web container. - Browse
/,/agents,/checks,/incidents,/events,/outbox. - Verify the web image does not log the token (
docker logsgreps clean).
7. Observability (optional)
- Add Monlet server to your Prometheus scrape config (
deploy/prometheus/prometheus.yml). - Import
deploy/grafana/dashboards/monlet-overview.jsonfor the starter dashboard. - If using Alertmanager as a notifier, point
MONLET_NOTIFIER_ALERTMANAGER_URLat it.
8. Operational
- Schedule database backups (
docs/ops/backup-restore.md). - Document token rotation owner and cadence (
docs/ops/token-rotation.md). - Add
monlet_server_open_incidentsandmonlet_server_agents{status="dead"}to your dashboards. - Decide an
eventsretention policy.