81 lines
2.6 KiB
Markdown
81 lines
2.6 KiB
Markdown
# monitoring site-gen
|
|
|
|
Build **console-style HTML** from `taler-monitoring` runs and stage them for
|
|
**host Caddy** (`/monitoring`, `/monitoring_err`).
|
|
|
|
Same **global reporting defaults** as host-agents (`run-host-report.sh`):
|
|
|
|
- **`RUN_TIMEOUT=600`** on each suite run
|
|
- **line-buffered** logs (continuous write)
|
|
- **always** write HTML (first run / empty logs too)
|
|
- Forgejo **commit link** in the page header
|
|
|
|
Applies to all nine fronts (GOA + FP stage + FP prod) in the default `SITES` list.
|
|
|
|
| Host | Role |
|
|
|------|------|
|
|
| **firecuda-external** | optional runner (public DNS) |
|
|
| **koopa-external** | deploy staging + Caddy (root service) |
|
|
| **host-agents** | primary: GOA + FP on-box (`../host-agent/`) |
|
|
|
|
No secrets in `settings.conf` — only hosts, paths, site list.
|
|
|
|
## firecuda-external (outside-only) — **disabled for now**
|
|
|
|
**firecuda-external could** run public-only monitoring (`SKIP_SSH=1`, phases
|
|
`urls versions`) on a schedule (launchd every 4h) and write HTML under
|
|
`~/var/taler-monitoring-sites-work/html/`. Scripts for that still live here
|
|
(`install-firecuda-timer.sh`, `run-on-firecuda.sh`, plist template).
|
|
|
|
**Current policy: do not run a real launchd job on firecuda.**
|
|
Primary GOA monitoring is **koopa host-agent** (`host-agent/`, user `hernani`,
|
|
local `podman exec`). Re-enable firecuda only if you explicitly want a second,
|
|
outside-only view.
|
|
|
|
```bash
|
|
# optional one-shot (no timer):
|
|
# ssh firecuda-external '~/taler-monitoring-site-gen/site-gen/run-on-firecuda.sh'
|
|
|
|
# if a timer was installed earlier, ensure it is off:
|
|
# ssh firecuda-external 'launchctl list | grep taler-monitoring || echo off'
|
|
```
|
|
|
|
Disabled plists may remain as `*.plist.disabled-*` under `~/Library/LaunchAgents/`.
|
|
|
|
## Quick start (laptop)
|
|
|
|
```bash
|
|
cd site-gen
|
|
cp settings.conf.example settings.conf # optional
|
|
chmod +x generate-monitoring-sites.sh deploy-monitoring-sites.sh console_to_html.py
|
|
|
|
ONLY_HOSTS="bank.hacktivism.ch exchange.hacktivism.ch taler.hacktivism.ch" \
|
|
SKIP_SSH=1 RUNNER_SSH= \
|
|
./generate-monitoring-sites.sh
|
|
|
|
./deploy-monitoring-sites.sh
|
|
```
|
|
|
|
Then on koopa **as root**: see **[ROOT-ON-KOOPA.md](./ROOT-ON-KOOPA.md)**.
|
|
|
|
## URL rules
|
|
|
|
| Path | When |
|
|
|------|------|
|
|
| `/monitoring_err/` | always: full console log + error list on top (CONTINUE_ON_ERROR run) |
|
|
| `/monitoring/` | **clean** full log if last strict run exit 0; else **stub** linking to `/monitoring_err/` |
|
|
|
|
Footer links **Forgejo commit** of the admin-log tree used for that run.
|
|
|
|
## Layout
|
|
|
|
```text
|
|
site-gen/
|
|
settings.conf.example
|
|
generate-monitoring-sites.sh
|
|
deploy-monitoring-sites.sh
|
|
console_to_html.py
|
|
caddy-monitoring-handles.snippet
|
|
ROOT-ON-KOOPA.md
|
|
README.md
|
|
```
|