@glassmkr/crucible 0.10.2 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,6 +31,100 @@ export interface Snapshot {
31
31
  file_descriptors?: FileDescriptorData;
32
32
  expected_reboot?: boolean;
33
33
  expected_reboot_reason?: string;
34
+ /** EDAC memory-error counters per memory controller + DIMM. */
35
+ ecc_edac?: EdacSnapshot;
36
+ /** PSI pressure-stall counters per resource (cpu, memory, io). */
37
+ psi?: PsiSnapshot;
38
+ /** /proc/vmstat swap-in/out rates. */
39
+ vmstat?: VmstatSnapshot;
40
+ /** pstore / kdump / wtmp signals corroborating a reboot. */
41
+ reboot_evidence?: RebootEvidence;
42
+ /** Hardware RAID controllers scraped via vendor CLIs. */
43
+ hardware_raid?: HardwareRaidSnapshot;
44
+ }
45
+ export interface EdacDimm {
46
+ /** dimm_label (vendor-defined string, e.g. "CPU1_DIMM_A1"). */
47
+ label: string;
48
+ /** dimm_location (slot number / chip-channel ordering). */
49
+ location: string;
50
+ /** DIMM size in MB; null if /sys did not report. */
51
+ size_mb: number | null;
52
+ ce_count: number;
53
+ ue_count: number;
54
+ }
55
+ export interface EdacSnapshot {
56
+ /** Sum of ce_count across all memory controllers. */
57
+ edac_corrected_total: number;
58
+ /** Sum of ue_count across all memory controllers. */
59
+ edac_uncorrected_total: number;
60
+ /** Per-DIMM detail. Empty array on hosts where dimm metadata
61
+ * isn't exposed (older EDAC drivers). */
62
+ dimms: EdacDimm[];
63
+ }
64
+ export interface PsiResource {
65
+ /** Rolling average % over the last 10 / 60 / 300 seconds. */
66
+ avg10: number;
67
+ avg60: number;
68
+ avg300: number;
69
+ /** Cumulative microseconds stalled since boot. */
70
+ total: number;
71
+ }
72
+ export interface PsiSnapshot {
73
+ cpu?: {
74
+ some: PsiResource;
75
+ full?: PsiResource;
76
+ };
77
+ memory?: {
78
+ some: PsiResource;
79
+ full?: PsiResource;
80
+ };
81
+ io?: {
82
+ some: PsiResource;
83
+ full?: PsiResource;
84
+ };
85
+ }
86
+ export interface VmstatSnapshot {
87
+ /** Cumulative pswpin since boot. */
88
+ pswpin_total: number;
89
+ pswpout_total: number;
90
+ /** Per-second swap-in rate over the most recent interval; null on
91
+ * the first snapshot (no baseline) or after a counter reset (host
92
+ * reboot mid-session). */
93
+ pswpin_rate: number | null;
94
+ pswpout_rate: number | null;
95
+ }
96
+ export interface RebootEvidence {
97
+ /** True if /sys/fs/pstore/ contains any dmesg-* / console-* records
98
+ * from the prior kernel. */
99
+ pstore_present: boolean;
100
+ /** Number of pstore records found (zero when pstore_present=false). */
101
+ pstore_record_count: number;
102
+ /** True if /var/crash/ contains a kdump vmcore. */
103
+ vmcore_present: boolean;
104
+ /** Most recent `last reboot -F` output line, verbatim. Null if
105
+ * `last` is unavailable or wtmp is empty. */
106
+ wtmp_reboot_record: string | null;
107
+ /** Heuristic: true when wtmp shows a `shutdown` record before the
108
+ * most recent reboot (suggests a clean shutdown). false when only
109
+ * the boot record is present (suggests hard reset or power loss). */
110
+ prior_shutdown_clean: boolean;
111
+ }
112
+ export interface HardwareRaidController {
113
+ vendor: "dell" | "hpe" | "lsi" | "adaptec";
114
+ controller_id: string;
115
+ /** Vendor-reported overall state, e.g. "Optimal", "Degraded",
116
+ * "Critical", "Failed", or "Unknown". The dashboard's
117
+ * raid_degraded evaluator pages on any state != "Optimal". */
118
+ state: string;
119
+ /** Count of physical disks the controller flagged as failed /
120
+ * degraded; null when the parser couldn't extract this. */
121
+ degraded_disks: number | null;
122
+ /** Optional vendor-text excerpt the dashboard can surface in
123
+ * evidence; null when not captured. */
124
+ raw_summary: string | null;
125
+ }
126
+ export interface HardwareRaidSnapshot {
127
+ controllers: HardwareRaidController[];
34
128
  }
35
129
  export interface ConntrackData {
36
130
  available: boolean;
@@ -58,6 +152,21 @@ export interface FileDescriptorData {
58
152
  max: number;
59
153
  percent: number;
60
154
  }
155
+ export interface ZfsVdev {
156
+ /** Vdev name, e.g. "raidz2-0", "mirror-0", or a raw device for
157
+ * single-device top-level stripes. */
158
+ name: string;
159
+ /** Vdev state from `zpool status` (ONLINE, DEGRADED, FAULTED,
160
+ * REMOVED, SUSPENDED, UNAVAIL). */
161
+ state: string;
162
+ /** Redundancy class. C6 addition (2026-05-19): scaled vdev severity
163
+ * matrix on the dashboard side depends on this so a DEGRADED
164
+ * raidz1 (zero remaining tolerance) pages differently from a
165
+ * DEGRADED raidz2 (one disk-fault budget left). */
166
+ redundancy_class: "mirror" | "raidz1" | "raidz2" | "raidz3" | "draid" | "stripe";
167
+ /** Number of child devices under this vdev in a non-ONLINE state. */
168
+ degraded_disks_count: number;
169
+ }
61
170
  export interface ZfsPool {
62
171
  name: string;
63
172
  state: string;
@@ -66,6 +175,14 @@ export interface ZfsPool {
66
175
  scrub_repaired?: string;
67
176
  last_scrub_date?: string;
68
177
  scrub_never_run?: boolean;
178
+ /** Top-level data vdevs. Always present from collector v0.10.4+.
179
+ * Dashboard tolerates absent (older agents) via capability gates. */
180
+ vdevs: ZfsVdev[];
181
+ /** Separate log (SLOG / ZIL) vdevs. Empty array on pools without
182
+ * a SLOG configured. */
183
+ slog_vdevs: ZfsVdev[];
184
+ /** Cache (L2ARC) vdevs. Empty array on pools without L2ARC. */
185
+ l2arc_vdevs: ZfsVdev[];
69
186
  }
70
187
  export interface ZfsData {
71
188
  pools: ZfsPool[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glassmkr/crucible",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "Lightweight bare metal server monitoring. IPMI, SMART, OS, network. Opinionated alerts.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",