monitoring: stats.json freshness + display fields outside-in
This commit is contained in:
parent
62d0e426f4
commit
3d5f412af3
5 changed files with 273 additions and 60 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue