code wiki / _hdl_build / nx_health_monitor.nx
nx_health_monitor.nx
buildroot/runtime/_hdl_build/nx_health_monitor.nx
about
nx_health_monitor.nx -- LIVE true-monitor: fetch each endpoint in health_templates.conf and validate the
actual CONTENT against its known-good template (nx_health_template) -- NOT just the HTTP status. Operator:
"check against known good templates -- a 404 being 'up' with a 200 status is wrong." This is the systemic fix
for the false-greens: a 200-with-error-content, a wrong/blank page, or a non-200 are all reported DOWN with the
specific reason. Composes the sovereign fetch (nx_research_fetch -> status + body to knowledge/fetched/
srch_latest.raw) + the gated htpl_verdict. Run: nx_health_monitor [conf]. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_health_template.nxnx_http_health_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const HM_MAGIC_1024: i64 = 1024 |
| 10 | const HM_MAGIC_8192: i64 = 8192 |
| 11 | const HM_MAGIC_2097152: i64 = 2097152 |
| 12 | const HM_MAGIC_8191: i64 = 8191 |
| 14 | const HM_BODY: *u8 = "knowledge/fetched/srch_latest.raw" as *u8 // where nx_research_fetch saves the body |
| 15 | const HM_FETCH_ELF: *u8 = "_offc/nx_research_fetch.elf" as *u8 |
functions
| 17 | func hm_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func hm_eol(b: *u8, n: i64, st: i64) -> i64 { var i: i64=st; var f: i64=0; while f==0 { if i>=n {f=1} else { if (b[i] as i64)==10 {f=1} else {i=i+1} } } return i } called by 1: main |
| 19 | func hm_verdict_name(v: i64) -> i64 |
| 27 | func main(argc: i64, argv: *i64) -> i64 |