Repository navigation
v2.10.0 - Chain/label mismatch warning + logrotate coexistence
Warns when the chain your node reports does not match NETWORK_LABEL, so a CLI
line pointed at the wrong daemon stops producing a confident card full of the wrong
network's numbers. Closes #43.
Chain/label mismatch warning (#43)
check_chain compares the label against the chain the node reports and adds a second
line when they clearly disagree:
✅ Chain: synced at block 178878 (test)
⚠️ Label/chain mismatch: label "Mainnet", node reports (test). Check CLI in your config.
One yellow alert fires, latched, so a persistent misconfiguration alerts once rather
than every five minutes, and clears green when the config is fixed. It is a second
line rather than a recoloured Chain line, because the node really is synced and the
warning also has to hold when the node is behind.
The comparison is deliberately lenient. The chain value is matched exactly, so
regtest never collides with the substring test. Only the label is matched loosely,
and it must clearly name a chain to be judged at all. Testnet26, Main Net Oracle
and my-mainnet-box match; Primary domain oracle, Latest net, Main Oracle Box,
a label naming both chains, and an empty label are all left alone. There is no config
toggle, because a label naming no chain already opts out.
Log-rotation coexistence
Raised by Aussie Epic. The DEBUG_LOG_ROTATE="no" guidance named developer log
capture as its only reason, when coexisting with logrotate is equally valid. The real
hazard turned out to be cadence: logrotate at size 2048M rotate 5 against
DEBUG_LOG_MAX_MB=2048 is the same threshold, but the monitor checks every five
minutes while logrotate runs daily. The monitor gets there first and truncates to
zero, so logrotate never sees a file big enough to rotate and rotate 5 never builds
up. One generation on disk, five believed, nothing logged and nothing warned. Only one
tool should own rotation. Full detail in the hardening guide.
Also in this release: SPDX-License-Identifier: MIT on all three scripts, and a
corrected weekly-cron example in the guide that no longer writes to the monitor's own
debug.log.1.
SHA256
oracle-monitor.sh e725190ce2cd41cb4258641cedb2efd35003727dd43f7843d51c04e648a6b11a
oracle-monitor.ps1 c45e18e38f49ac0c8c6491e5e53d4d3dee3fb43ce560eea101dd5d22e83b3bdb
oracle-monitor-macos.sh 3ef09a3981132c20d648953aa9d13443e0e2089aef865f3ef2cb36f091fb9b62
config.template 4a224218f6de05969c20f55d526c83cf873eb22c8a0c3a57a6266cfb4123a436
config.template.ps1 82595da4c1d47517956e82e7559ce68016776a8bd48ac43f2de925532cece166
config-macos.template 72e6687cd95068210958e224b1d1666d148f47940fe9dfa90a8fd18217c6dbd0
Both .ps1 files ship UTF-8 with BOM (ef bb bf), verified against GitHub raw
after publish.