monitoring: stats.json freshness + display fields outside-in

This commit is contained in:
Hernâni Marques 2026-07-17 16:56:09 +02:00
parent 62d0e426f4
commit 3d5f412af3
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
5 changed files with 273 additions and 60 deletions

View file

@ -238,6 +238,7 @@ fi
GEN=$(now_iso)
HUMAN=$(now_human)
GEN_UNIX=$(date +%s)
num_or_null() { case "${1:-}" in ''|null) echo null ;; *) echo "$1" ;; esac; }
MEM_JSON='"container_rss_human": "—"'
@ -257,6 +258,7 @@ cat >"$TMP" <<EOF
"timezone": $(json_str "$TZ"),
"generated_at": $(json_str "$GEN"),
"generated_at_human": $(json_str "$HUMAN"),
"generated_at_unix": ${GEN_UNIX},
"reserves": ${RESERVES:-0},
"wire_in_count": ${RESERVES_IN:-0},
"wire_in_amount": $(json_str "$WIRE_IN_AMT"),