Add docs/MONITORING.md with links to OBSERVABILITY_PROMETHEUS.md, RUNBOOK_SLO.md, deploy/grafana dashboard JSON, paperclip MONITORING_INDEX (BIT-221), and ENVIRONMENTS § Observability. Extend README § Docs with the same entry point. Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f) Paperclip-Issue: BIT-1949 Paperclip-Run: 1f160242-9803-4a1b-a07b-828d0dc629aa
52 lines
2.1 KiB
Markdown
52 lines
2.1 KiB
Markdown
# errors.bitreport.pt
|
|
|
|
BitReport **central error reporting** platform: ingest API, collector worker, admin UI (incidents), MariaDB migrations, and optional **admin portal** (auth/RBAC) from BIT-183.
|
|
|
|
**Remote:** `https://git.bitreport.pt/BitReport.pt/errors.bitreport.pt.git`
|
|
**Tracking:** Paperclip **BIT-247** (migration from `OTT/error-reporting/`).
|
|
|
|
## Layout
|
|
|
|
| Path | Role |
|
|
|------|------|
|
|
| `ingest-api/` | Fastify HTTP ingest (BIT-154.x) |
|
|
| `collector-worker/` | Polls configured sources → ingest API |
|
|
| `admin-ui/` | Next.js operator UI (incidents) |
|
|
| `database/error_reporting/` | SQL migrations + dev seed (used by Compose + LXC) |
|
|
| `deploy/lxc/` | systemd, nginx examples, migrate script (no Docker) |
|
|
| `docker-compose.yml`, `.env.example` | Local / Proxmox Docker stack |
|
|
| `api/` | Fastify admin API — sessions, RBAC (BIT-183) |
|
|
| `web/` | Next.js admin login/UI for `api/` |
|
|
| `db/migrations/` | Admin-user schema (SQL); applied with error_reporting migrations via `scripts/docker-migrate.sh` |
|
|
| `docs/` | Permission matrix, deployment runbooks |
|
|
|
|
## Docker Compose (ingest stack)
|
|
|
|
From the **repository root**:
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
docker compose up --build
|
|
curl -sf "http://127.0.0.1:${ER_PUBLISH_INGEST_PORT:-3041}/health"
|
|
```
|
|
|
|
## Docs
|
|
|
|
- **Monitoring & observability** (hub metrics, SLO runbook, Grafana import, link to company [`MONITORING_INDEX`](https://git.bitreport.pt/BitReport.pt/paperclip/src/branch/main/docs/MONITORING_INDEX.md)): [`docs/MONITORING.md`](docs/MONITORING.md)
|
|
- Compose + TLS: [`docs/deployment/bitreport-error-reporting-compose-proxmox.md`](docs/deployment/bitreport-error-reporting-compose-proxmox.md)
|
|
- LXC + systemd: [`docs/deployment/bitreport-error-reporting-lxc-proxmox.md`](docs/deployment/bitreport-error-reporting-lxc-proxmox.md)
|
|
|
|
## Tests (local)
|
|
|
|
```bash
|
|
cd ingest-api && npm ci && npm test
|
|
cd ../api && npm ci && npm test
|
|
```
|
|
|
|
Integration tests for ingest (`ingest-api/src/integration.twoProjects.test.ts`) require a migrated MariaDB and:
|
|
|
|
```bash
|
|
export ERROR_REPORTING_TEST_DATABASE_URL='mysql://USER:[email protected]:3306/error_reporting'
|
|
cd ingest-api && npm test
|
|
```
|