From 909e6a65dac4c8fee05f39af0eb7d1dd6646dc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A2ni=20Marques?= Date: Sun, 19 Jul 2026 01:50:10 +0200 Subject: [PATCH] release 1.7.5: monpages soft for stacks without public HTML MONPAGES_REQUIRE_PUBLIC=0 turns missing public pages into WARN. FrancPaysan host-agent wrappers default to 0 until Infomaniak vhosts serve /monitoring*. GOA/koopa keep require=1. --- VERSION | 2 +- VERSIONS.md | 7 +++--- check_monitoring_pages.sh | 33 +++++++++++++++++++-------- host-agent/run-fp-prod-monitoring.sh | 2 ++ host-agent/run-fp-stage-monitoring.sh | 2 ++ 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/VERSION b/VERSION index 3511591..5849151 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.4 \ No newline at end of file +1.7.5 \ No newline at end of file diff --git a/VERSIONS.md b/VERSIONS.md index 4ba5335..a788b0d 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -13,11 +13,12 @@ Tags and `VERSION` use **MAJOR.FEATURE.FIX** (three components), introduced in * | **FEATURE** | New capabilities (phases, HTML features, i18n packs, …) | | **FIX** | Bugfixes and docs that do not add a feature | -Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.7.4`). File `VERSION` omits the `v` prefix. +Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.7.5`). File `VERSION` omits the `v` prefix. | Tag | Date (UTC) | Notes | |-----|------------|--------| | **v1.8.0** | *planned* | **L10n** packs for user-facing strings: **fr-CH** (FrancPaysan) and **de-CH** (hacktivism / Taler CH German). | +| **v1.7.5** | 2026-07-18 | **Bugfix:** monpages soft mode `MONPAGES_REQUIRE_PUBLIC=0` (FP wrappers default) — missing public HTML is WARN until vhost publish; generic publish hints. | | **v1.7.4** | 2026-07-18 | **Bugfix:** monpages bare URLs (`/monitoring` without `/`) WARN by default (trailing slash remains ERROR); avoids false red when slash form is live. | | **v1.7.3** | 2026-07-18 | Monitoring **pages themselves** as suite scope: README section + sticky “What this monitors” block (monpages / public HTML paths). | | **v1.7.2** | 2026-07-18 | **Bugfix:** Caddy static handles — `root` must be host dir + matcher `/monitoring*` (not leaf dir + `/monitoring/`), else file_server returns empty 404 after apply. | @@ -38,7 +39,7 @@ Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.7.4`). File `VERSION` omits the `v` pre ## Sticky bar version (v1.3.0+) -Generated HTML shows the installed release tag (e.g. `v1.7.4`) and links to Forgejo: +Generated HTML shows the installed release tag (e.g. `v1.7.5`) and links to Forgejo: `https://git.hacktivism.ch/hernani/taler-monitoring/src/tag/` @@ -68,5 +69,5 @@ Full locale packs (fr-CH / de-CH): **v1.8.0** (planned). ```bash git clone https://git.hacktivism.ch/hernani/taler-monitoring.git ~/src/taler-monitoring -cd ~/src/taler-monitoring && git checkout v1.7.4 +cd ~/src/taler-monitoring && git checkout v1.7.5 ``` diff --git a/check_monitoring_pages.sh b/check_monitoring_pages.sh index 8752597..5a118a5 100755 --- a/check_monitoring_pages.sh +++ b/check_monitoring_pages.sh @@ -22,6 +22,9 @@ source "$ROOT/lib.sh" set_area monpages section "monpages · public monitoring HTML via FQDN (outside-in)" +# MONPAGES_REQUIRE_PUBLIC=0 → missing public pages are WARN (staging-only stacks / FP until vhost) +: "${MONPAGES_REQUIRE_PUBLIC:=1}" + # Default hosts from domain (mirror run-host-report.sh) if [ -z "${MON_HOSTS:-}" ]; then case "${TALER_DOMAIN:-}" in @@ -112,6 +115,17 @@ _is_bare_url() { esac } + +_mon_fail_or_soft() { + local label="$1" detail="$2" + if [ "${MONPAGES_REQUIRE_PUBLIC:-1}" != "1" ]; then + warn "$label" "$detail (MONPAGES_REQUIRE_PUBLIC=0)" + return 0 + fi + fail "$label" "$detail" + return 1 +} + check_one() { local url="$1" local body code hint soft=0 @@ -128,10 +142,10 @@ check_one() { rm -f "$body" return 0 fi - fail "public mon page missing" \ - "$url -> HTTP $code merchant/API JSON code 21 (Caddy handle not live — sudo ~/koopa-caddy/apply-monitoring-live.sh)" + _mon_fail_or_soft "public mon page missing" \ + "$url -> HTTP $code merchant/API JSON code 21 (publish HTML + reverse-proxy handle /monitoring*)" || { rm -f "$body"; return 1; } rm -f "$body" - return 1 + return 0 fi if [ "$code" != "200" ]; then if [ "$soft" = "1" ]; then @@ -139,9 +153,9 @@ check_one() { rm -f "$body" return 0 fi - fail "public mon page" "$url -> HTTP $code (want 200 HTML)" + _mon_fail_or_soft "public mon page" "$url -> HTTP $code (want 200 HTML)" || { rm -f "$body"; return 1; } rm -f "$body" - return 1 + return 0 fi if is_monitoring_html "$body"; then if grep -qE 'sticky-bar|version-link' "$body" 2>/dev/null; then @@ -153,9 +167,9 @@ check_one() { return 0 fi hint=$(head -c 120 "$body" | tr '\n' ' ' | tr -cd '[:print:] ') - fail "public mon page not monitoring HTML" "$url -> HTTP 200 body!=suite (${hint}...)" + _mon_fail_or_soft "public mon page not monitoring HTML" "$url -> HTTP 200 body!=suite (${hint}...)" || { rm -f "$body"; return 1; } rm -f "$body" - return 1 + return 0 } URLS=() @@ -206,8 +220,9 @@ for u in "${URLS[@]}"; do done if [ "$ec" -ne 0 ]; then - echo " hint: public pages down (merchant JSON code 21 = Caddy has no /monitoring* handles)" - echo " fix on stack host: sudo ~/koopa-caddy/apply-monitoring-live.sh" + echo " hint: public monitoring HTML not served (404 / merchant code 21)" + echo " publish staging HTML + configure reverse-proxy/Caddy handle for /monitoring*" + echo " (on koopa: sudo ~/koopa-caddy/apply-monitoring-live.sh)" # Staging vs public diagnosis (host-agent sets MONPAGES_STAGING_BASE / HTML_OUT) _stg="${MONPAGES_STAGING_BASE:-${HTML_OUT:-${HTML_BASE:-$HOME/monitoring-sites-staging}}}" _ok_dir="${HTML_OK_DIR:-monitoring}" diff --git a/host-agent/run-fp-prod-monitoring.sh b/host-agent/run-fp-prod-monitoring.sh index 89eb05f..20dfd71 100755 --- a/host-agent/run-fp-prod-monitoring.sh +++ b/host-agent/run-fp-prod-monitoring.sh @@ -15,6 +15,8 @@ export INSIDE_PODMAN="${INSIDE_PODMAN:-1}" export INSIDE_MODE="${INSIDE_MODE:-local-podman}" export LOCAL_STACK="${LOCAL_STACK:-0}" export CONTINUE_ON_ERROR="${CONTINUE_ON_ERROR:-1}" +# Public /monitoring* not wired on Infomaniak yet — monpages WARN only +export MONPAGES_REQUIRE_PUBLIC="${MONPAGES_REQUIRE_PUBLIC:-0}" export RUN_TIMEOUT="${RUN_TIMEOUT:-600}" export PHASES="${PHASES:-urls inside versions monpages}" export MON_HOSTS="${MON_HOSTS:-bank.lefrancpaysan.ch exchange.lefrancpaysan.ch monnaie.lefrancpaysan.ch}" diff --git a/host-agent/run-fp-stage-monitoring.sh b/host-agent/run-fp-stage-monitoring.sh index fd52e07..6bf4b5b 100755 --- a/host-agent/run-fp-stage-monitoring.sh +++ b/host-agent/run-fp-stage-monitoring.sh @@ -16,6 +16,8 @@ export INSIDE_MODE="${INSIDE_MODE:-local-podman}" export INSIDE_PROFILE="${INSIDE_PROFILE:-stage-lfp}" export LOCAL_STACK="${LOCAL_STACK:-0}" export CONTINUE_ON_ERROR="${CONTINUE_ON_ERROR:-1}" +# Public /monitoring* not wired on Infomaniak yet — monpages WARN only +export MONPAGES_REQUIRE_PUBLIC="${MONPAGES_REQUIRE_PUBLIC:-0}" export RUN_TIMEOUT="${RUN_TIMEOUT:-600}" export PHASES="${PHASES:-urls inside versions monpages}" export MON_HOSTS="${MON_HOSTS:-stage.bank.lefrancpaysan.ch stage.exchange.lefrancpaysan.ch stage.monnaie.lefrancpaysan.ch}"