2.9 KiB
Root: make monitoring pages live on koopa (GOA)
Detection (v1.3.1+)
Suite phase monpages and the host-agent post-check curl each public
FQDN (https://taler.hacktivism.ch/monitoring/ …). Merchant JSON code 21
or non-HTML is an ERROR until this apply is done.
Symptom if not applied
Public URLs return merchant/bank JSON like:
{ "code": 21, "hint": "There is no endpoint defined for the URL provided..." }
or a 404 HTML page from the app reverse_proxy.
Cause: live /etc/caddy/Caddyfile has no handle /monitoring* (falls through to
API). Prepared config is only under /home/hernani/koopa-caddy/Caddyfile.
One-shot as root (recommended)
# absolute path required: as root, ~ is /root (not /home/hernani)
sudo /home/hernani/koopa-caddy/apply-monitoring-live.sh
# or already root:
# /home/hernani/koopa-caddy/apply-monitoring-live.sh
Caddy bare-path redir (v1.9.2+): inside a handle block use
redir * /path/ 302 — never redir /path/ 302 alone (Caddy treats the first
token as matcher and sets Location: 302, so bare URLs fall through to the
merchant API as JSON code 21).
That script:
rsyncstaging HTML →/var/www/monitoring-sites/(incl. surface + aptdeploy)- Makes tree writable for
hernani(groupcaddy+ ACL) so later runs self-sync - Installs prepared Caddyfile →
/etc/caddy/Caddyfile, validates, reloads Caddy - Smoke-curls all monitoring URLs (must not be JSON
code:21)
Paths (only three families — suite name ≠ URL)
There is no public page /taler-monitoring. Each family needs bare and slash
(redir * /path/ 302 inside Caddy handle):
| Family | Paths | Host | Source timer |
|---|---|---|---|
| monitoring | /monitoring · /monitoring/ · /monitoring_err · /monitoring_err/ |
bank + exchange + taler (and other landings) | taler-monitoring-hacktivism.timer (4h) |
| taler-monitoring-surface | bare + slash + _err |
taler.hacktivism.ch only | taler-monitoring-surface.timer (1h) |
| taler-monitoring-aptdeploy | bare + slash + _err |
taler.hacktivism.ch only | taler-monitoring-aptdeploy.timer (4h) |
HTML is generated as hernani into
/home/hernani/monitoring-sites-staging/.
Manual equivalent
rsync -a --delete /home/hernani/monitoring-sites-staging/ /var/www/monitoring-sites/
chown -R hernani:caddy /var/www/monitoring-sites && chmod -R g+rwX /var/www/monitoring-sites
sudo /home/hernani/koopa-caddy/apply.sh # or apply-monitoring-live.sh
Expect 200 (HTML with sticky bar). Not merchant JSON code:21.
After each monitoring run (if www is not hernani-writable)
rsync -a --delete /home/hernani/monitoring-sites-staging/ /var/www/monitoring-sites/
chown -R caddy:caddy /var/www/monitoring-sites
Or grant hernani write on /var/www/monitoring-sites once so the host-agent can rsync itself.