code wiki / _hdl_build / nx_health_monitor.nx

nx_health_monitor.nx

buildroot/runtime/_hdl_build/nx_health_monitor.nx

5496 B98 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic health
docsdependenciesstructsconstsfunctions

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

nx_health_template.nx nx_http_health_lib.nx nx_health_monitor.nx

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

main sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close hm_w hm_eol dep_run_capture sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve_clean sys_close ↻ sys_execve sys_exit sys_wait4 hh_after dp_len htpl_verdict htpl_has_error htpl_contains htpl_contains ↻ hm_verdict_name hm_w ↻

structs

none

consts

9const HM_MAGIC_1024: i64 = 1024
10const HM_MAGIC_8192: i64 = 8192
11const HM_MAGIC_2097152: i64 = 2097152
12const HM_MAGIC_8191: i64 = 8191
14const HM_BODY: *u8 = "knowledge/fetched/srch_latest.raw" as *u8 // where nx_research_fetch saves the body
15const HM_FETCH_ELF: *u8 = "_offc/nx_research_fetch.elf" as *u8

functions

17func 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 }
called by 2: hm_verdict_namemain
18func 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
19func hm_verdict_name(v: i64) -> i64
called by 1: main calls 1: hm_w
27func main(argc: i64, argv: *i64) -> i64