Toggle the full observability stack — Prometheus, Grafana, Loki, and 7 more services — and open the dashboard in one command.
# Start the monitoring stack
nself monitor start
# Open Grafana in your browser
nself monitor dashboard
# Check which monitoring services are running
nself monitor status
# Stop the monitoring stack (preserves data)
nself monitor stopnself monitor <SUBCOMMAND> [FLAGS]nself monitor manages the optional 10-service monitoring bundle that ships with every ɳSelf stack. The bundle is off by default in development (too heavy for laptop use) and enabled by default in staging and production. You can toggle it independently of the core stack.
All monitoring services bind to 127.0.0.1 and are accessible through your nginx proxy at their configured subdomains (e.g. grafana.local.nself.org in dev,grafana.yourdomain.com in production). No monitoring port is exposed directly to the internet.
Prometheus scrapes metrics from all running ɳSelf services automatically — no manual configuration needed. Grafana ships with pre-built dashboards for Postgres, Hasura, auth, nginx, and your custom services. Loki collects all container logs and makes them searchable in Grafana's Explore view.
| Service | Role | Default port (internal) |
|---|---|---|
| Prometheus | Metrics collection and alerting rules | 9090 |
| Grafana | Dashboards and visualization | 3000 |
| Loki | Log aggregation | 3100 |
| Promtail | Log shipping agent (Docker → Loki) | — |
| Tempo | Distributed tracing | 3200 |
| Alertmanager | Alert routing (email, Slack, PagerDuty) | 9093 |
| cAdvisor | Container resource metrics | 8080 |
| Node Exporter | Host OS metrics (CPU, RAM, disk, network) | 9100 |
| Postgres Exporter | Postgres query and replication metrics | 9187 |
| Redis Exporter | Redis metrics (enabled when Redis is running) | 9121 |
Start all 10 monitoring services. If the core stack is not running, ɳSelf starts it first.
| Flag | Type | Default | Description |
|---|---|---|---|
--no-loki | bool | false | Skip Loki and Promtail (reduces memory by ~200 MB) |
--no-tempo | bool | false | Skip Tempo (reduces memory by ~150 MB) |
--lite | bool | false | Start only Prometheus, Grafana, and Node Exporter — minimal footprint for dev |
nself monitor start
nself monitor start --lite # dev-friendly: Prometheus + Grafana + Node Exporter only
nself monitor start --no-tempo # skip tracing to save memoryStop the monitoring stack. Core services (Postgres, Hasura, Auth, Nginx) continue running. Prometheus data is preserved in its Docker volume.
nself monitor stopPrint the health of each monitoring service: running, stopped, or degraded.
nself monitor status
# SERVICE STATUS UPTIME MEMORY
# prometheus running 2h 14m 128 MB
# grafana running 2h 14m 94 MB
# loki running 2h 14m 189 MB
# promtail running 2h 14m 22 MB
# tempo running 2h 14m 156 MB
# alertmanager running 2h 14m 18 MB
# cadvisor running 2h 14m 42 MB
# node-exporter running 2h 14m 12 MB
# postgres-exporter running 2h 14m 14 MB
# redis-exporter stopped — — (Redis not enabled)Open the Grafana dashboard in your default browser. Grafana must be running (start it with nself monitor start first).
| Flag | Type | Default | Description |
|---|---|---|---|
--service | string | Jump directly to a pre-built dashboard: postgres, hasura, nginx, system, logs | |
--url | bool | false | Print the URL instead of opening a browser |
nself monitor dashboard
nself monitor dashboard --service postgres
nself monitor dashboard --service logs # opens Loki Explore view
nself monitor dashboard --url # print URL for remote access| Dashboard | --service shortcut | Shows |
|---|---|---|
| System Overview | system | CPU, RAM, disk, network (Node Exporter) |
| Postgres | postgres | Query latency, locks, replication lag, connection pool |
| Hasura | hasura | Request rate, error rate, subscription count, cache hit ratio |
| Nginx | nginx | Request rate, response codes, latency percentiles |
| Containers | containers | Per-container CPU/RAM (cAdvisor) |
| Log Explorer | logs | Loki log search across all services |
| Traces | traces | Tempo distributed trace viewer |
Alert routing rules live in backend/monitoring/alertmanager.yml. This file is hand-managed (not regenerated by nself build).
# Example: route critical alerts to Slack
backend/monitoring/
alertmanager.yml ← edit for your alert receivers
rules/
postgres.yml ← pre-built alert rules
hasura.yml
system.ymlnself start
nself monitor start
nself monitor status
nself monitor dashboard --url# Use --lite to avoid 700 MB of extra containers during development
nself monitor start --lite
nself monitor dashboard --service systemnself monitor dashboard --service postgres
# → Opens the Postgres dashboard filtered to queries > 100msENABLE_MONITORING — set to true to start monitoring automatically with nself start (default: false in dev, true in staging/prod)GRAFANA_ADMIN_PASSWORD — Grafana admin password (default: admin in dev; must be set in prod)PROMETHEUS_RETENTION — how long to keep metrics data (default: 15d)0 — success1 — one or more services failed to start2 — invalid arguments3 — core stack not running (start with nself start first)