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

@ -363,6 +363,7 @@ CUR_JSON="${CUR_JSON}
GEN=$(now_iso)
HUMAN=$(now_human)
GEN_UNIX=$(date +%s)
# Live performance probes (exchange-style)
measure_ms() {
@ -406,6 +407,7 @@ cat >"$TMP" <<EOF
"timezone": $(json_str "$TZ"),
"generated_at": $(json_str "$GEN"),
"generated_at_human": $(json_str "$HUMAN"),
"generated_at_unix": ${GEN_UNIX},
"instances": ${INSTANCES:-0},
"orders": ${TOTAL_CONTRACTS:-0},
"paid": ${TOTAL_PAID:-0},