Anso
42fc8048fe
fix(metrics): host memory usage excludes reclaimable page cache ( #1297 )
...
* fix(metrics): host memory usage excludes reclaimable page cache
Host RAM was computed as mem.used / mem.total via systeminformation, but mem.used counts
reclaimable buffers/cache as used, so a busy Linux host read ~99%. Switch the dashboard stats,
the fleet node self-report, and the host-RAM alert threshold to mem.active / mem.total
(cache-excluded), and report used: mem.active and free: mem.available so the byte readout stays
consistent with the percentage. Add regression tests for a cache-heavy host (no false alert) and
a genuinely busy host (alert still fires).
* test(metrics): assert system stats memory excludes reclaimable cache
The cached /api/system/stats test mocked si.mem() without active/available, so after
the route switched to the cache-excluded fields it produced a NaN percentage that the
shape-only assertions did not catch. Fill the mock with a realistic shape and assert the
route reports the active working set, not the cache-inclusive used/free.
2026-06-03 16:11:00 -04:00
..
2026-05-15 18:21:28 -04:00
2026-04-23 21:22:39 -04:00
2026-04-13 22:17:03 -04:00
2026-05-15 18:21:28 -04:00
2026-06-03 08:18:16 -04:00
2026-06-03 08:18:16 -04:00
2026-05-21 11:45:37 -04:00
2026-05-29 00:12:39 -04:00
2026-05-31 16:36:07 -04:00
2026-06-01 13:01:22 -04:00
2026-04-05 18:45:57 -04:00
2026-05-15 18:21:28 -04:00
2026-05-31 16:00:38 -04:00
2026-05-31 16:00:38 -04:00
2026-04-26 13:05:19 -04:00
2026-05-01 18:57:44 -04:00
2026-05-29 15:12:48 -04:00
2026-05-29 15:12:48 -04:00
2026-05-29 15:12:48 -04:00
2026-05-12 15:49:19 -04:00
2026-06-01 17:27:59 -04:00
2026-05-12 15:49:19 -04:00
2026-06-03 16:11:00 -04:00
2026-04-10 10:05:05 -04:00
2026-05-31 20:28:18 -04:00
2026-05-20 03:35:39 -04:00
2026-06-01 17:27:59 -04:00
2026-06-01 17:27:59 -04:00
2026-05-12 19:30:49 -04:00
2026-05-28 20:51:45 -04:00
2026-06-02 16:10:05 -04:00
2026-04-14 14:37:28 -04:00
2026-04-15 20:23:12 -04:00
2026-05-31 16:36:07 -04:00
2026-05-26 11:08:33 -04:00
2026-04-13 09:49:11 -04:00
2026-05-07 13:41:10 -04:00
2026-05-19 19:49:16 -04:00
2026-05-07 12:53:13 -04:00
2026-05-25 21:09:00 -04:00
2026-05-07 13:48:11 -04:00
2026-04-24 22:28:25 -04:00
2026-05-07 13:26:00 -04:00
2026-04-17 07:57:08 -04:00
2026-05-25 23:44:31 -04:00
2026-05-17 05:25:00 -04:00
2026-05-14 10:20:57 -04:00
2026-06-02 21:40:38 -04:00
2026-06-02 16:11:24 -04:00
2026-04-05 18:45:57 -04:00
2026-05-22 02:40:22 -04:00
2026-04-14 13:47:48 -04:00
2026-05-31 16:00:38 -04:00
2026-06-02 21:40:38 -04:00
2026-04-14 08:23:05 -04:00
2026-05-25 01:46:08 -04:00
2026-05-25 01:46:08 -04:00
2026-05-24 01:06:22 -04:00
2026-05-29 00:12:39 -04:00
2026-05-25 01:30:00 -04:00
2026-05-19 07:27:12 -04:00
2026-06-01 14:18:44 -04:00
2026-06-01 14:18:44 -04:00
2026-05-14 10:21:08 -04:00
2026-05-22 00:30:51 -04:00
2026-05-31 20:28:18 -04:00
2026-05-23 00:04:05 -04:00
2026-05-22 01:27:27 -04:00
2026-06-02 08:58:54 -04:00
2026-06-01 17:26:11 -04:00
2026-05-07 13:16:24 -04:00
2026-05-07 16:18:19 -04:00
2026-05-19 19:49:16 -04:00
2026-06-01 17:27:25 -04:00
2026-06-01 17:27:25 -04:00
2026-06-01 17:27:59 -04:00
2026-05-28 20:51:45 -04:00
2026-05-29 09:43:37 -04:00
2026-06-02 22:02:49 -04:00
2026-05-29 09:43:37 -04:00
2026-05-29 21:09:20 -04:00
2026-05-17 17:31:57 -04:00
2026-05-31 20:29:30 -04:00
2026-05-31 20:29:30 -04:00
2026-06-01 19:47:06 -04:00
2026-04-16 20:32:38 -04:00
2026-05-31 16:00:00 -04:00
2026-05-31 16:00:00 -04:00
2026-06-02 16:10:05 -04:00
2026-04-24 10:20:08 -04:00
2026-05-25 23:48:12 -04:00
2026-05-25 23:48:12 -04:00
2026-04-13 12:49:03 -04:00
2026-05-02 00:39:41 -04:00
2026-04-24 16:26:36 -04:00
2026-05-29 21:09:20 -04:00
2026-05-29 21:09:20 -04:00
2026-05-09 00:11:09 -04:00
2026-05-23 18:09:39 -04:00
2026-05-18 16:48:09 -04:00
2026-05-18 16:48:09 -04:00
2026-05-08 15:51:39 -04:00
2026-05-20 12:53:29 -04:00
2026-05-17 05:06:58 -04:00
2026-06-02 16:12:13 -04:00
2026-05-14 20:51:42 -04:00
2026-05-17 22:00:31 -04:00
2026-05-16 14:58:19 -04:00
2026-05-15 14:33:57 -04:00
2026-05-14 20:51:42 -04:00
2026-05-20 12:53:29 -04:00
2026-06-02 16:09:25 -04:00
2026-05-17 22:00:31 -04:00
2026-05-22 13:20:27 -04:00
2026-05-22 21:08:56 -04:00
2026-05-18 01:52:18 -04:00
2026-05-17 22:00:31 -04:00
2026-05-17 14:01:39 -04:00
2026-05-29 21:09:20 -04:00
2026-06-01 13:01:22 -04:00
2026-05-07 19:23:11 -04:00
2026-05-07 19:23:11 -04:00
2026-06-03 16:11:00 -04:00
2026-04-14 10:59:11 -04:00
2026-05-01 18:57:44 -04:00
2026-06-02 09:51:42 -04:00
2026-05-14 10:21:08 -04:00
2026-06-02 09:48:19 -04:00
2026-05-19 19:49:16 -04:00
2026-06-02 10:26:31 -04:00
2026-05-17 20:11:44 -04:00
2026-05-29 21:09:57 -04:00
2026-05-29 21:09:57 -04:00
2026-05-29 21:09:57 -04:00
2026-05-08 11:59:02 -04:00
2026-05-08 03:48:35 -04:00
2026-05-08 10:00:15 -04:00
2026-05-14 20:51:42 -04:00
2026-05-08 09:03:22 -04:00
2026-05-14 20:51:42 -04:00
2026-05-07 21:28:35 -04:00
2026-05-20 12:53:29 -04:00
2026-05-21 01:00:47 -04:00
2026-05-07 23:45:16 -04:00
2026-05-20 03:35:25 -04:00
2026-05-07 21:28:35 -04:00
2026-05-17 22:00:31 -04:00
2026-05-08 16:21:34 -04:00
2026-04-17 20:31:43 -04:00
2026-05-16 14:58:19 -04:00
2026-05-08 09:02:59 -04:00
2026-05-07 23:51:52 -04:00
2026-05-17 01:16:21 -04:00
2026-06-01 13:39:46 -04:00
2026-05-28 14:16:46 -04:00
2026-04-09 17:56:58 -04:00
2026-06-02 16:11:24 -04:00
2026-04-14 17:58:57 -04:00
2026-05-15 18:21:28 -04:00
2026-05-23 16:03:48 -04:00
2026-05-13 09:40:45 -04:00
2026-05-05 12:54:26 -04:00
2026-05-26 11:08:33 -04:00
2026-04-25 13:55:07 -04:00
2026-06-01 17:27:59 -04:00
2026-06-01 19:47:06 -04:00
2026-06-01 13:39:46 -04:00
2026-05-21 23:54:01 -04:00
2026-05-28 12:45:10 -04:00
2026-05-20 03:36:08 -04:00
2026-05-23 18:09:39 -04:00
2026-04-16 20:32:38 -04:00
2026-06-01 17:27:59 -04:00
2026-05-19 07:27:12 -04:00
2026-05-15 18:21:28 -04:00
2026-05-19 00:13:57 -04:00
2026-05-25 21:25:59 -04:00
2026-05-28 12:45:10 -04:00
2026-05-31 17:47:34 -04:00
2026-05-24 15:56:53 -04:00
2026-05-24 15:48:17 -04:00
2026-05-18 00:14:10 -04:00
2026-05-24 15:43:36 -04:00
2026-05-25 01:29:47 -04:00
2026-06-02 21:54:01 -04:00
2026-04-12 05:43:15 -04:00
2026-05-24 16:07:54 -04:00
2026-05-24 01:12:07 -04:00
2026-05-24 01:12:07 -04:00
2026-05-24 16:07:54 -04:00
2026-05-24 15:44:12 -04:00
2026-04-25 17:26:04 -04:00
2026-06-02 19:53:45 -04:00
2026-05-24 15:18:47 -04:00
2026-05-25 21:09:00 -04:00
2026-05-13 09:40:45 -04:00
2026-05-07 16:18:19 -04:00
2026-05-07 16:18:19 -04:00
2026-05-23 00:04:05 -04:00
2026-05-21 23:10:13 -04:00
2026-05-29 11:46:51 -04:00
2026-05-29 11:46:51 -04:00
2026-05-08 03:50:03 -04:00
2026-05-08 15:24:25 -04:00
2026-05-07 19:23:11 -04:00
2026-04-17 07:57:08 -04:00
2026-05-31 20:28:18 -04:00
2026-05-07 19:23:11 -04:00
2026-04-24 23:37:32 -04:00
2026-05-21 01:00:47 -04:00
2026-06-01 13:01:22 -04:00
2026-04-24 22:23:31 -04:00
2026-05-05 00:09:40 -04:00
2026-04-16 20:32:38 -04:00
2026-05-29 09:43:37 -04:00
2026-05-23 16:03:48 -04:00