Server metrics (/metrics) — your server tells metrics collector how it is
What it is
The NanumOS server edition can answer GET /metrics by itself, in the text format a metrics collector reads, with the same metric names as the common node_exporter. An existing metrics collector can watch a NanumOS server with nothing installed on it: CPU, memory, disk, network, services and the server's own checks, as numbers.
Basics
Think of a dashboard glass on the side of the machine: whoever is allowed to look through it sees the gauges (how busy, how full, which services run), and nobody else can even see the glass. The metrics collector is the person who writes the gauges down every 15 seconds. Try now: on the server type u metricsd --check, it says where it would listen and who is allowed.
How to use it
- In the collector's config file: a job with
static_configs: - targets: ["SERVER:9100"]. Dashboards made for node_exporter (load, memory, filesystem, network, disk bytes) work as they are. enable=noswitches it off. Port 80 and 443 are refused unless the file sayspublic_port=yes(do not).- The doctor line 「서버 지표(/metrics)」 and the numbers
nanumos_doctor_status(0 normal, 1 warning, 2 danger) show the same judgement.
How it works
metricsd reads what the kernel already shows (/proc/stat, /proc/meminfo, /proc/storage, /proc/metrics, the service list) when metrics collector asks, writes it in the exposition format, and answers. A peer that is not on the allow list is closed without a single byte read.
Technical details
- Code:
user/cmds/metricsd.c,user/cmds/metrics_core.h, kernel/proc/metrics(src/ramfs.c). Contract with every metric, label and unit:docs/contracts/METRICS.md. - Config keys:
enable,listen(loopback|wire| address),port(9100),allow(addresses or A.B.C.D/N with N from 8),public_port,httpd_port,httpd_path. nanumos_httpd_*come from httpd's status page on loopback, so each scrape adds one request tonanumos_httpd_requests_total.- Checked with
promtool check metricsand a stock metrics collector intests/metrics_prom.py.
What this app takes and sends
| Takes | Nothing from outside. It reads this machine's own counters. |
| Sends | Only to an address on the allow list that asks: load, memory, disk and network byte counts, service names and whether they run, the OS build id, the host name and kernel version. No file names, user names, keys, other machines' addresses or message content. Nothing is sent unasked. |
| How to turn it off | enable=no in that file, or service metrics stop. Desktop editions never start it. |
Frequently asked
Who can read it?
Do I need node_exporter too?
No. The names are the same on purpose, so the same metrics collector rules and dashboards work.
Why is node_load1 low on a busy server?
It counts busy CPUs, not programs waiting for a CPU, because the kernel does not keep a run queue.
NanumOS 0.1.8349 · 2026-11-16