小橘 9a3c50c257 refactor: consolidate senses — merge tcp-socket-stats into system-health, remove cpu-usage
- Remove cpu-usage sense (redundant with system-health loadavg)
- Remove linux-tcp-socket-stats (merged into linux-system-health)
- Remove disk-usage-mounts (unused)
- Add tcp socket fields to system-health schema + migration
- Simplify nerve.yaml: 4 senses → 2

小橘 <xiaoju@shazhou.work>
2026-04-24 06:13:51 +00:00

14 lines
570 B
TypeScript

import { integer, real, sqliteTable } from "drizzle-orm/sqlite-core";
export const hermesGatewayHealth = sqliteTable("hermes_gateway_health", {
id: integer("id").primaryKey({ autoIncrement: true }),
ts: integer("ts").notNull(),
alive: integer("alive").notNull(),
mainPid: integer("main_pid").notNull(),
rssBytes: integer("rss_bytes").notNull(),
cpuPercent: real("cpu_percent").notNull(),
uptimeSec: integer("uptime_sec").notNull(),
activeSessions: integer("active_sessions").notNull(),
childProcessCount: integer("child_process_count").notNull(),
});