release 1.11.0: sticky error/warn log filter

Click error or warning counts in the sticky bar to show only matching
console lines; sticky stats and top overviews remain. Hashes
#filter-error / #filter-warn (and #first-*) activate the filter.
This commit is contained in:
Hernâni Marques 2026-07-19 02:16:39 +02:00
parent 341504f1ad
commit db6722e40f
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
5 changed files with 213 additions and 50 deletions

View file

@ -1,23 +1,27 @@
# Host Caddy (root service). Place BEFORE catch-all reverse_proxy in each site block.
#
# CRITICAL (v1.7.2): root must be the *host directory* (…/monitoring-sites/{host}),
# and the matcher must be a path *prefix* (`/monitoring*`), so that URI
# /monitoring/index.html maps to {root}/monitoring/index.html.
# CRITICAL: bare paths (no trailing slash) must redirect to slash, or the request
# falls through to merchant/bank/exchange API → Taler JSON code 21.
#
# WRONG (causes empty HTTP 404 from Caddy file_server):
# handle /monitoring/ {
# root * …/monitoring-sites/{host}/monitoring
# file_server
# }
# → looks for …/monitoring/monitoring/index.html
# CORRECT (site-level named matcher — preferred):
# @mon_bare path /monitoring /monitoring_err \
# /taler-monitoring-surface /taler-monitoring-surface_err \
# /taler-monitoring-aptdeploy /taler-monitoring-aptdeploy_err
# redir @mon_bare {path}/ 302
#
# CRITICAL (v1.9.2): bare-path redir inside handle MUST use matcher `*`:
# ALSO OK inside handle (matcher must be `*`):
# handle /taler-monitoring-surface {
# redir * /taler-monitoring-surface/ 302
# }
# WRONG: `redir /taler-monitoring-surface/ 302` is parsed as
# matcher=/taler-monitoring-surface/ to="302" → Location: 302, merchant code 21
# (same footgun for /monitoring, aptdeploy, mail, mattermost bare paths).
#
# WRONG (Caddy footgun — causes merchant code 21 on bare URLs):
# redir /taler-monitoring-surface/ 302
# → parsed as matcher=/taler-monitoring-surface/ to="302"
# → Location: 302, or no-op then fallthrough to reverse_proxy
#
# root must be the *host directory* (…/monitoring-sites/{host}), and the
# file_server matcher a path *prefix* (`/monitoring*`), so
# /monitoring/index.html maps to {root}/monitoring/index.html.
#
# Disk layout:
# /var/www/monitoring-sites/{host}/monitoring/index.html
@ -25,49 +29,44 @@
#
# Live apply on koopa (absolute path — ~ as root is /root):
# sudo /home/hernani/koopa-caddy/apply-monitoring-live.sh
# Runtime-only (no sudo; hernani admin API):
# curl -g -X POST http://[::1]:2019/load -H 'Content-Type: text/caddyfile' \
# --data-binary @/home/hernani/koopa-caddy/Caddyfile
# --- only inside taler.hacktivism.ch { ... } ---
handle /taler-monitoring-surface {
redir * /taler-monitoring-surface/ 302
@mon_bare path /monitoring /monitoring_err \
/taler-monitoring-surface /taler-monitoring-surface_err \
/taler-monitoring-aptdeploy /taler-monitoring-aptdeploy_err \
/taler-monitoring-mail /taler-monitoring-mail_err \
/taler-monitoring-mattermost /taler-monitoring-mattermost_err
redir @mon_bare {path}/ 302
handle /taler-monitoring-surface_err* {
root * /var/www/monitoring-sites/taler.hacktivism.ch
file_server
}
handle /taler-monitoring-surface* {
root * /var/www/monitoring-sites/taler.hacktivism.ch
file_server
}
handle /taler-monitoring-surface_err {
redir * /taler-monitoring-surface_err/ 302
}
handle /taler-monitoring-surface_err* {
handle /taler-monitoring-aptdeploy_err* {
root * /var/www/monitoring-sites/taler.hacktivism.ch
file_server
}
handle /taler-monitoring-aptdeploy {
redir * /taler-monitoring-aptdeploy/ 302
}
handle /taler-monitoring-aptdeploy* {
root * /var/www/monitoring-sites/taler.hacktivism.ch
file_server
}
handle /taler-monitoring-aptdeploy_err {
redir * /taler-monitoring-aptdeploy_err/ 302
}
handle /taler-monitoring-aptdeploy_err* {
root * /var/www/monitoring-sites/taler.hacktivism.ch
file_server
}
# --- bank + exchange + taler (each site block; set root host dir) ---
handle /monitoring {
redir * /monitoring/ 302
@mon_bare path /monitoring /monitoring_err
redir @mon_bare {path}/ 302
handle /monitoring_err* {
root * /var/www/monitoring-sites/{host}
file_server
}
handle /monitoring* {
root * /var/www/monitoring-sites/{host}
file_server
}
handle /monitoring_err {
redir * /monitoring_err/ 302
}
handle /monitoring_err* {
root * /var/www/monitoring-sites/{host}
file_server
}